aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-08-06added missing files to Makefile.amHEADmasterRobin Haberkorn1-1/+9
Fixes building tarballs. We also include the test suite, the original stand-alone Makefile and READMEs.
2026-07-24updated READMERobin Haberkorn1-0/+3
2026-07-24fixed REG_ICASE for non-ANSI (Unicode) characters in the regular expressionRobin Haberkorn3-4/+23
* This was a combination of conversion loss and a too small color map. * The test suite was actually broken for Unicode since we have to `setlocale(LC_ALL, "")` for the libc Unicode handling functions to work as expected. SciTECO already did that. * Added test cases for plain Unicode (Cyrillic) characters in the regexp and for character ranges.
2026-07-05Makefile.am: added TEREX_CPPFLAGSRobin Haberkorn1-1/+1
This allows you to pass in additional flags like `-DREG_DEBUG`. terex is *not* built with assertions by default unless you define REG_DEBUG.
2026-07-03Automake: build with `-Wall`Robin Haberkorn1-0/+1
2026-06-29implemented tere_set_is_interrupted_cb()Robin Haberkorn7-5/+39
Allows you to set up a callback that's invoked repeatedly during matching. If it returns non-0 matching will abort and REG_EINTR is returned. Allows you to interrupt long-running regexp executions that would otherwise block the UI or hang the entire application.
2026-06-29added my copyright to all touched filesRobin Haberkorn12-0/+12
* Perhaps I am also obliged to document what I changed in the copyright header? Not sure. * The license header doesn't necessarily have to be reproduced in binary distributions.
2026-06-27re_free() and re_error() have also been renamed to tere_free() and ↵Robin Haberkorn4-6/+8
tere_error() for consistency The headers still define regfree() and regerror() functions, but they shouldn't collide with libc unless you include the POSIX regex.h. Also tere_free() can now be called on nullified regex_t objects, which eases error handling a bit.
2026-06-27fixup REG_ANCHORED: the checks have to be in shortest()Robin Haberkorn3-8/+16
I put them into longest() as well, but it appears that both find() and cfind() will always try shortest() first and should abort if that returns NULL.
2026-06-27implemented REG_ANCHORED execution flagRobin Haberkorn5-48/+80
* So you can anchor executions of already compiled patterns. In principle REG_BOSONLY could also be handled by the same code. * Required by SciTECO. * Test suite has been fixed and extended. The test program now takes getopt() style short arguments to specify flags.
2026-06-27renamed re_comp() to tere_comp() and re_exec() to tere_exec()Robin Haberkorn4-9/+11
Fixes inclusion into programs that also include unistd.h on BSD, which also provides re_comp() and re_exec() implementations.
2026-06-27Added more Autotools build artefacts to .gitignoreRobin Haberkorn1-0/+7
2026-06-27REG_RAW is a pure re_comp() flag nowRobin Haberkorn4-6/+6
I missed the possibility to query the compilation flags from the execution variables.
2026-06-26added new project READMERobin Haberkorn2-8/+49
The original hsrex README has been re-added as README.old.
2026-06-26allow raw (ASCII) matching via REG_RAW flag, so we no longer need a ↵Robin Haberkorn11-157/+193
compile-time flag You no longer need to build two libraries just for supporting raw/ASCII and UTF-8 patterns. This makes using the library a lot easier and reduces the total binary size. Since strings are always `unsigned char *` now internally and the raw vs. UTF-8 decision is important only in a few select places, it would make no sense to use meta-programming techniques. The test suite has been extended and is now fixed for cases with embedded non-printable characters.
2026-06-21added Automake fileRobin Haberkorn1-0/+11
Builds two convenience libraries: libterex.la and libteurex.la.
2026-06-21renamed hsrex to terexRobin Haberkorn3-14/+15
This will be the SciTECO regular expression engine and we have to fork it permanently.
2026-06-21fixed some warnings when building with `-Wall`Robin Haberkorn3-10/+14
2026-06-21Unicode builds now expect UTF-8 stringsRobin Haberkorn15-443/+252
* They are built with `-DREGEX_UTF8` instead of `-DREGEX_WCHAR`. Functions are called reg_ucomp() and reg_uexec() instead for consistency. The library is now called libhsurex.so instead of libhswrex.so. * The `chr` type is now always `unsigned char`. As a result many other uses of the `chr` type had to be changed to pchr (which is always large enough to hold a byte or wide character). Generally we try to keep code changes as small as possible since we may have to backport changes from the Tcl codebase or contribute patches to the Tcl project.
2026-06-21added .gitignoreRobin Haberkorn1-0/+2
2014-12-26importGary Houston21-0/+11628