1 /********************************************************************
3 * Copyright (c) 2008-2010, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
9 // This file contains utility code for supporting UText in the regular expression engine.
11 // This class is internal to the regular expression implementation.
12 // For the public Regular Expression API, see the file "unicode/regex.h"
18 #include "unicode/utypes.h"
19 #include "unicode/utext.h"
23 #define UTEXT_USES_U16(ut) (NULL==((ut)->pFuncs->mapNativeIndexToUTF16))
26 #define REGEX_DISABLE_CHUNK_MODE 1
29 #ifdef REGEX_DISABLE_CHUNK_MODE
30 # define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) (FALSE)
32 # define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) ((0==((ut)->chunkNativeStart))&&((len)==((ut)->chunkNativeLimit))&&((len)==((ut)->nativeIndexingLimit)))
35 struct URegexUTextUnescapeCharContext
{
39 #define U_REGEX_UTEXT_UNESCAPE_CONTEXT(text) { (text), -1 }
41 U_CFUNC UChar U_CALLCONV
42 uregex_utext_unescape_charAt(int32_t offset
, void * /* struct URegexUTextUnescapeCharContext* */ context
);
43 U_CFUNC UChar U_CALLCONV
44 uregex_ucstr_unescape_charAt(int32_t offset
, void * /* UChar* */ context
);