1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/i18n/regextxt.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +/******************************************************************** 1.5 + * COPYRIGHT: 1.6 + * Copyright (c) 2008-2010, International Business Machines Corporation and 1.7 + * others. All Rights Reserved. 1.8 + ********************************************************************/ 1.9 +// 1.10 +// file: regextxt.h 1.11 +// 1.12 +// This file contains utility code for supporting UText in the regular expression engine. 1.13 +// 1.14 +// This class is internal to the regular expression implementation. 1.15 +// For the public Regular Expression API, see the file "unicode/regex.h" 1.16 +// 1.17 + 1.18 +#ifndef _REGEXTXT_H 1.19 +#define _REGEXTXT_H 1.20 + 1.21 +#include "unicode/utypes.h" 1.22 +#include "unicode/utext.h" 1.23 + 1.24 +U_NAMESPACE_BEGIN 1.25 + 1.26 +#define UTEXT_USES_U16(ut) (NULL==((ut)->pFuncs->mapNativeIndexToUTF16)) 1.27 + 1.28 +#if 0 1.29 +#define REGEX_DISABLE_CHUNK_MODE 1 1.30 +#endif 1.31 + 1.32 +#ifdef REGEX_DISABLE_CHUNK_MODE 1.33 +# define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) (FALSE) 1.34 +#else 1.35 +# define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) ((0==((ut)->chunkNativeStart))&&((len)==((ut)->chunkNativeLimit))&&((len)==((ut)->nativeIndexingLimit))) 1.36 +#endif 1.37 + 1.38 +struct URegexUTextUnescapeCharContext { 1.39 + UText *text; 1.40 + int32_t lastOffset; 1.41 +}; 1.42 +#define U_REGEX_UTEXT_UNESCAPE_CONTEXT(text) { (text), -1 } 1.43 + 1.44 +U_CFUNC UChar U_CALLCONV 1.45 +uregex_utext_unescape_charAt(int32_t offset, void * /* struct URegexUTextUnescapeCharContext* */ context); 1.46 +U_CFUNC UChar U_CALLCONV 1.47 +uregex_ucstr_unescape_charAt(int32_t offset, void * /* UChar* */ context); 1.48 + 1.49 +U_NAMESPACE_END 1.50 + 1.51 +#endif