intl/icu/source/i18n/regextxt.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /********************************************************************
michael@0 2 * COPYRIGHT:
michael@0 3 * Copyright (c) 2008-2010, International Business Machines Corporation and
michael@0 4 * others. All Rights Reserved.
michael@0 5 ********************************************************************/
michael@0 6 //
michael@0 7 // file: regextxt.h
michael@0 8 //
michael@0 9 // This file contains utility code for supporting UText in the regular expression engine.
michael@0 10 //
michael@0 11 // This class is internal to the regular expression implementation.
michael@0 12 // For the public Regular Expression API, see the file "unicode/regex.h"
michael@0 13 //
michael@0 14
michael@0 15 #ifndef _REGEXTXT_H
michael@0 16 #define _REGEXTXT_H
michael@0 17
michael@0 18 #include "unicode/utypes.h"
michael@0 19 #include "unicode/utext.h"
michael@0 20
michael@0 21 U_NAMESPACE_BEGIN
michael@0 22
michael@0 23 #define UTEXT_USES_U16(ut) (NULL==((ut)->pFuncs->mapNativeIndexToUTF16))
michael@0 24
michael@0 25 #if 0
michael@0 26 #define REGEX_DISABLE_CHUNK_MODE 1
michael@0 27 #endif
michael@0 28
michael@0 29 #ifdef REGEX_DISABLE_CHUNK_MODE
michael@0 30 # define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) (FALSE)
michael@0 31 #else
michael@0 32 # define UTEXT_FULL_TEXT_IN_CHUNK(ut,len) ((0==((ut)->chunkNativeStart))&&((len)==((ut)->chunkNativeLimit))&&((len)==((ut)->nativeIndexingLimit)))
michael@0 33 #endif
michael@0 34
michael@0 35 struct URegexUTextUnescapeCharContext {
michael@0 36 UText *text;
michael@0 37 int32_t lastOffset;
michael@0 38 };
michael@0 39 #define U_REGEX_UTEXT_UNESCAPE_CONTEXT(text) { (text), -1 }
michael@0 40
michael@0 41 U_CFUNC UChar U_CALLCONV
michael@0 42 uregex_utext_unescape_charAt(int32_t offset, void * /* struct URegexUTextUnescapeCharContext* */ context);
michael@0 43 U_CFUNC UChar U_CALLCONV
michael@0 44 uregex_ucstr_unescape_charAt(int32_t offset, void * /* UChar* */ context);
michael@0 45
michael@0 46 U_NAMESPACE_END
michael@0 47
michael@0 48 #endif

mercurial