Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: icu46/source/i18n/regextxt.cpp

Issue 5516007: Check in the pristine copy of ICU 4.6... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « icu46/source/i18n/regextxt.h ('k') | icu46/source/i18n/reldtfmt.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /********************************************************************
2 * COPYRIGHT:
3 * Copyright (c) 2008-2010, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
6 //
7 // file: regextxt.cpp
8 //
9 // This file contains utility code for supporting UText in the regular expressi on engine.
10 //
11
12 #include "regextxt.h"
13
14 U_NAMESPACE_BEGIN
15
16 U_CFUNC UChar U_CALLCONV
17 uregex_utext_unescape_charAt(int32_t offset, void *ct) {
18 struct URegexUTextUnescapeCharContext *context = (struct URegexUTextUnescape CharContext *)ct;
19 UChar32 c;
20 if (offset == context->lastOffset + 1) {
21 c = UTEXT_NEXT32(context->text);
22 context->lastOffset++;
23 } else if (offset == context->lastOffset) {
24 c = UTEXT_PREVIOUS32(context->text);
25 UTEXT_NEXT32(context->text);
26 } else {
27 utext_moveIndex32(context->text, offset - context->lastOffset - 1);
28 c = UTEXT_NEXT32(context->text);
29 context->lastOffset = offset;
30 }
31
32 // !!!: Doesn't handle characters outside BMP
33 if (U_IS_BMP(c)) {
34 return (UChar)c;
35 } else {
36 return 0;
37 }
38 }
39
40 U_CFUNC UChar U_CALLCONV
41 uregex_ucstr_unescape_charAt(int32_t offset, void *context) {
42 return ((UChar *)context)[offset];
43 }
44
45 U_NAMESPACE_END
OLDNEW
« no previous file with comments | « icu46/source/i18n/regextxt.h ('k') | icu46/source/i18n/reldtfmt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698