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

Side by Side Diff: fpdfsdk/src/javascript/Consts.cpp

Issue 1171733003: Remove typdefs for pointer types in fx_system.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual fixes. Created 5 years, 6 months 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
« no previous file with comments | « fpdfsdk/src/fxedit/fxet_list.cpp ('k') | fpdfsdk/src/javascript/JS_EventHandler.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 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/javascript/JavaScript.h" 7 #include "../../include/javascript/JavaScript.h"
8 #include "../../include/javascript/IJavaScript.h" 8 #include "../../include/javascript/IJavaScript.h"
9 #include "../../include/javascript/JS_Define.h" 9 #include "../../include/javascript/JS_Define.h"
10 #include "../../include/javascript/JS_Object.h" 10 #include "../../include/javascript/JS_Object.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 DEFINE_GLOBAL_CONST(pRuntime, IDS_STARTUP_CONSOLE_MSG, ** ^_^ **); 144 DEFINE_GLOBAL_CONST(pRuntime, IDS_STARTUP_CONSOLE_MSG, ** ^_^ **);
145 145
146 return 0; 146 return 0;
147 } 147 }
148 148
149 /* ------------------------------ CJS_GlobalArrays ----------------------------- - */ 149 /* ------------------------------ CJS_GlobalArrays ----------------------------- - */
150 150
151 int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) 151 int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime)
152 { 152 {
153 { 153 {
154 » » FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP"; 154 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP";
155 » » FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"}; 155 » » const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"};
156 DEFINE_GLOBAL_ARRAY(pRuntime); 156 DEFINE_GLOBAL_ARRAY(pRuntime);
157 } 157 }
158 158
159 { 159 {
160 » » FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP"; 160 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP";
161 » » FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */ 161 » » const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
162 L"[+-] ?\\.\\d+", /* -.1 */ 162 L"[+-] ?\\.\\d+", /* -.1 */
163 L"[+-] ?\\d+\\." /* -1. */ 163 L"[+-] ?\\d+\\." /* -1. */
164 }; 164 };
165 DEFINE_GLOBAL_ARRAY(pRuntime); 165 DEFINE_GLOBAL_ARRAY(pRuntime);
166 } 166 }
167 167
168 { 168 {
169 » » FX_LPCWSTR ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP"; 169 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP";
170 » » FX_LPCWSTR ArrayContent[] = {L"[+-]?\\d*,?\\d*"}; 170 » » const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*,?\\d*"};
171 171
172 DEFINE_GLOBAL_ARRAY(pRuntime); 172 DEFINE_GLOBAL_ARRAY(pRuntime);
173 } 173 }
174 174
175 { 175 {
176 » » FX_LPCWSTR ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP"; 176 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP";
177 » » FX_LPCWSTR ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */ 177 » » const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */
178 L"[+-] ?[.,]\\d+", /* -,1 */ 178 L"[+-] ?[.,]\\d+", /* -,1 */
179 L"[+-]?\\d+[.,]" /* -1, */ 179 L"[+-]?\\d+[.,]" /* -1, */
180 }; 180 };
181 DEFINE_GLOBAL_ARRAY(pRuntime); 181 DEFINE_GLOBAL_ARRAY(pRuntime);
182 } 182 }
183 183
184 { 184 {
185 » » FX_LPCWSTR ArrayName = L"RE_ZIP_ENTRY"; 185 » » const FX_WCHAR* ArrayName = L"RE_ZIP_ENTRY";
186 FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}"}; 186 const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}"};
187 DEFINE_GLOBAL_ARRAY(pRuntime); 187 DEFINE_GLOBAL_ARRAY(pRuntime);
188 } 188 }
189 189
190 { 190 {
191 » » FX_LPCWSTR ArrayName = L"RE_ZIP_COMMIT"; 191 » » const FX_WCHAR* ArrayName = L"RE_ZIP_COMMIT";
192 » » FX_LPCWSTR ArrayContent[] = {L"\\d{5}"}; 192 » » const FX_WCHAR* ArrayContent[] = {L"\\d{5}"};
193 DEFINE_GLOBAL_ARRAY(pRuntime); 193 DEFINE_GLOBAL_ARRAY(pRuntime);
194 } 194 }
195 195
196 { 196 {
197 » » FX_LPCWSTR ArrayName = L"RE_ZIP4_ENTRY"; 197 » » const FX_WCHAR* ArrayName = L"RE_ZIP4_ENTRY";
198 » » FX_LPCWSTR ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"}; 198 » » const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}" };
199 DEFINE_GLOBAL_ARRAY(pRuntime); 199 DEFINE_GLOBAL_ARRAY(pRuntime);
200 } 200 }
201 201
202 { 202 {
203 » » FX_LPCWSTR ArrayName = L"RE_ZIP4_COMMIT"; 203 » » const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT";
204 » » FX_LPCWSTR ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"}; 204 » » const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"};
205 DEFINE_GLOBAL_ARRAY(pRuntime); 205 DEFINE_GLOBAL_ARRAY(pRuntime);
206 } 206 }
207 207
208 { 208 {
209 » » FX_LPCWSTR ArrayName = L"RE_PHONE_ENTRY"; 209 » » const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY";
210 » » FX_LPCWSTR ArrayContent[] = { 210 » » const FX_WCHAR* ArrayContent[] = {
211 L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4} ", /* 555-1234 or 408 555-1234 */ 211 L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4} ", /* 555-1234 or 408 555-1234 */
212 L"\\(\\d{0,3}", /* (408 */ 212 L"\\(\\d{0,3}", /* (408 */
213 L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\ d{0,4}", /* (408) 555-1234 */ 213 L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\ d{0,4}", /* (408) 555-1234 */
214 /* (allow the addition of parens as an a fterthought) */ 214 /* (allow the addition of parens as an a fterthought) */
215 L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0 ,4}", /* (408 555-1234 */ 215 L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0 ,4}", /* (408 555-1234 */
216 L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0 ,4}", /* 408) 555-1234 */ 216 L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0 ,4}", /* 408) 555-1234 */
217 L"011(\\.|[- \\d])*" /* international */ 217 L"011(\\.|[- \\d])*" /* international */
218 }; 218 };
219 DEFINE_GLOBAL_ARRAY(pRuntime); 219 DEFINE_GLOBAL_ARRAY(pRuntime);
220 } 220 }
221 221
222 { 222 {
223 » » FX_LPCWSTR ArrayName = L"RE_PHONE_COMMIT"; 223 » » const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT";
224 » » FX_LPCWSTR ArrayContent[] = { 224 » » const FX_WCHAR* ArrayContent[] = {
225 L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */ 225 L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */
226 L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{ 4}", /* 408 555-1234 */ 226 L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{ 4}", /* 408 555-1234 */
227 L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ] )?\\d{4}", /* (408) 555-1234 */ 227 L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ] )?\\d{4}", /* (408) 555-1234 */
228 L"011(\\.|[- \\d])*" /* international */ 228 L"011(\\.|[- \\d])*" /* international */
229 }; 229 };
230 DEFINE_GLOBAL_ARRAY(pRuntime); 230 DEFINE_GLOBAL_ARRAY(pRuntime);
231 } 231 }
232 232
233 { 233 {
234 » » FX_LPCWSTR ArrayName = L"RE_SSN_ENTRY"; 234 » » const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY";
235 » » FX_LPCWSTR ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[ - ])?\\d{0,4}"}; 235 » » const FX_WCHAR* ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}( \\.|[- ])?\\d{0,4}"};
236 DEFINE_GLOBAL_ARRAY(pRuntime); 236 DEFINE_GLOBAL_ARRAY(pRuntime);
237 } 237 }
238 238
239 { 239 {
240 » » FX_LPCWSTR ArrayName = L"RE_SSN_COMMIT"; 240 » » const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT";
241 » » FX_LPCWSTR ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ]) ?\\d{4}"}; 241 » » const FX_WCHAR* ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.| [- ])?\\d{4}"};
242 DEFINE_GLOBAL_ARRAY(pRuntime); 242 DEFINE_GLOBAL_ARRAY(pRuntime);
243 } 243 }
244 244
245 return 0; 245 return 0;
246 } 246 }
247 247
OLDNEW
« no previous file with comments | « fpdfsdk/src/fxedit/fxet_list.cpp ('k') | fpdfsdk/src/javascript/JS_EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698