diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-05-06 09:28:01 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-05-22 08:24:21 -0600 |
commit | a027039367d8b0d7e425d682b287cef406d072e2 (patch) | |
tree | e6348723a5178078d85c6eba4c325a1c3f97d467 /utf8.h | |
parent | 50ba90ffe5821effdba066df4bc3986dee904e0c (diff) | |
download | perl-a027039367d8b0d7e425d682b287cef406d072e2.tar.gz |
utf8.c: Add nomix-ASCII option to to_fold functions
Under /iaa regex matching, folds that cross the ASCII/non-ASCII
boundary are prohibited. This changes _to_uni_fold_flags() and
_to_utf8_fold_flags() functions to take a new flag which, when set,
tells them to not accept such folds.
This allows us to later move the intelligence for handling this
situation to these centralized functions.
Diffstat (limited to 'utf8.h')
-rw-r--r-- | utf8.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -20,8 +20,9 @@ /* For to_utf8_fold_flags, q.v. */ #define FOLD_FLAGS_LOCALE 0x1 #define FOLD_FLAGS_FULL 0x2 +#define FOLD_FLAGS_NOMIX_ASCII 0x4 -#define to_uni_fold(c, p, lenp) _to_uni_fold_flags(c, p, lenp, 1) +#define to_uni_fold(c, p, lenp) _to_uni_fold_flags(c, p, lenp, FOLD_FLAGS_FULL) #define to_utf8_fold(c, p, lenp) _to_utf8_fold_flags(c, p, lenp, \ FOLD_FLAGS_FULL, NULL) #define to_utf8_lower(a,b,c) _to_utf8_lower_flags(a,b,c,0, NULL) |