| 1 |
. |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _REGEXTXT_H |
| 18 |
#define _REGEXTXT_H |
| 19 |
|
| 20 |
#include "unicode/utypes.h" |
| 21 |
#include "unicode/utext.h" |
| 22 |
|
| 23 |
U_NAMESPACE_BEGIN |
| 24 |
|
| 25 |
#define UTEXT_USES_U16(ut) (NULL==((ut)->pFuncs->mapNativeIndexToUTF16)) |
| 26 |
|
| 27 |
#if 0 |
| 28 |
#define REGEX_DISABLE_CHUNK_MODE 1 |
| 29 |
#endif |
| 30 |
|
| 31 |
#ifdef REGEX_DISABLE_CHUNK_MODE |
| 32 |
# define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) (false) |
| 33 |
#else |
| 34 |
# define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) ((0==((ut)->chunkNativeStart))&&((len)==((ut)->chunkNativeLimit))&&((len)==((ut)->nativeIndexingLimit))) |
| 35 |
#endif |
| 36 |
|
| 37 |
struct URegexUTextUnescapeCharContext { |
| 38 |
UText *text; |
| 39 |
int32_t lastOffset; |
| 40 |
}; |
| 41 |
#define U_REGEX_UTEXT_UNESCAPE_CONTEXT(text) { (text), -1 } |
| 42 |
|
| 43 |
U_CFUNC UChar U_CALLCONV |
| 44 |
uregex_utext_unescape_charAt(int32_t offset, void * context); |
| 45 |
U_CFUNC UChar U_CALLCONV |
| 46 |
uregex_ucstr_unescape_charAt(int32_t offset, void * context); |
| 47 |
|
| 48 |
U_NAMESPACE_END |
| 49 |
|
| 50 |
#endif |