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

Side by Side Diff: src/third_party/jscre/pcre_ucp_searchfuncs.cpp

Issue 12511: Added the v8::jscre namespace around the jscre functions to avoid link errors... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 12 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 | « src/third_party/jscre/pcre_tables.cpp ('k') | src/third_party/jscre/pcre_xclass.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This is JavaScriptCore's variant of the PCRE library. While this library 1 /* This is JavaScriptCore's variant of the PCRE library. While this library
2 started out as a copy of PCRE, many of the features of PCRE have been 2 started out as a copy of PCRE, many of the features of PCRE have been
3 removed. This library now supports only the regular expression features 3 removed. This library now supports only the regular expression features
4 required by the JavaScript language specification, and has only the functions 4 required by the JavaScript language specification, and has only the functions
5 needed by JavaScriptCore and the rest of WebKit. 5 needed by JavaScriptCore and the rest of WebKit.
6 6
7 Originally written by Philip Hazel 7 Originally written by Philip Hazel
8 Copyright (c) 1997-2006 University of Cambridge 8 Copyright (c) 1997-2006 University of Cambridge
9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved. 9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved.
10 10
(...skipping 28 matching lines...) Expand all
39 39
40 40
41 /* This module contains code for searching the table of Unicode character 41 /* This module contains code for searching the table of Unicode character
42 properties. */ 42 properties. */
43 43
44 #include "pcre_internal.h" 44 #include "pcre_internal.h"
45 45
46 #include "ucpinternal.h" /* Internal table details */ 46 #include "ucpinternal.h" /* Internal table details */
47 #include "ucptable.cpp" /* The table itself */ 47 #include "ucptable.cpp" /* The table itself */
48 48
49 namespace v8 { namespace jscre {
50
49 /************************************************* 51 /*************************************************
50 * Search table and return other case * 52 * Search table and return other case *
51 *************************************************/ 53 *************************************************/
52 54
53 /* If the given character is a letter, and there is another case for the 55 /* If the given character is a letter, and there is another case for the
54 letter, return the other case. Otherwise, return -1. 56 letter, return the other case. Otherwise, return -1.
55 57
56 Arguments: 58 Arguments:
57 c the character value 59 c the character value
58 60
(...skipping 30 matching lines...) Expand all
89 the other case if there is one, else -1. */ 91 the other case if there is one, else -1. */
90 92
91 if (ucp_table[mid].f0 & f0_rangeflag) 93 if (ucp_table[mid].f0 & f0_rangeflag)
92 return -1; 94 return -1;
93 95
94 int offset = ucp_table[mid].f1 & f1_casemask; 96 int offset = ucp_table[mid].f1 & f1_casemask;
95 if (offset & f1_caseneg) 97 if (offset & f1_caseneg)
96 offset |= f1_caseneg; 98 offset |= f1_caseneg;
97 return !offset ? -1 : c + offset; 99 return !offset ? -1 : c + offset;
98 } 100 }
101
102 } } // namespace v8::jscre
OLDNEW
« no previous file with comments | « src/third_party/jscre/pcre_tables.cpp ('k') | src/third_party/jscre/pcre_xclass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698