diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-06-26 23:14:44 +0200 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-06-26 23:14:44 +0200 |
| commit | eb1fcdf5d1058f4fbdf3a2661573dd7e4d3976f3 (patch) | |
| tree | cdb7caf92fd29cb3d2ab3d28f2cd5c9604c0d1c4 /regex.h | |
| parent | 16cf84d794bfe9fdb245d38760256286384d8380 (diff) | |
| download | terex-eb1fcdf5d1058f4fbdf3a2661573dd7e4d3976f3.tar.gz | |
allow raw (ASCII) matching via REG_RAW flag, so we no longer need a 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.
Diffstat (limited to 'regex.h')
| -rw-r--r-- | regex.h | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -119,16 +119,9 @@ extern "C" { # undef regerror # define regfree re_free # define regerror re_error -// FIXME # undef __REG_WIDE_T # define __REG_WIDE_T unsigned char -# undef __REG_WIDE_COMPILE -# define __REG_WIDE_COMPILE re_ucomp -# undef __REG_WIDE_EXEC -# define __REG_WIDE_EXEC re_uexec -# ifndef REGEX_UTF8 -# undef __REG_NOCHAR -# endif +# undef __REG_NOCHAR #endif /* @@ -237,6 +230,7 @@ typedef struct { #define REG_DUMP 004000 /* none of your business :-) */ #define REG_FAKE 010000 /* none of your business :-) */ #define REG_PROGRESS 020000 /* none of your business :-) */ +#define REG_RAW 040000 /* pattern and subject are raw ASCII (also an execution flag) */ /* * execution |
