Changeset 21772 in webkit
- Timestamp:
- May 25, 2007 12:34:58 PM (17 years ago)
- Location:
- S60/trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
S60/trunk/JavaScriptCore/ChangeLog
r21644 r21772 1 2007-05-23 malaiya, 2 reviewed by Yongjun 3 DESC: disabled 'SUPPORT_UTF8'flag support in prce 4 http://bugs.webkit.org/show_bug.cgi?id=13847 5 TSW ID : ELWI-6Z2AAU 6 7 * pcre/pcre-config.h: 8 * pcre/pcre.c: 9 (pcre_compile): 10 1 11 2007-05-22 bujtas <zbujtas@gmail.com> 2 12 -
S60/trunk/JavaScriptCore/pcre/pcre-config.h
r20905 r21772 3 3 #define HAVE_STRERROR 1 4 4 #define NEWLINE 10 5 #define SUPPORT_UTF8 05 //#define SUPPORT_UTF8 0 -
S60/trunk/JavaScriptCore/pcre/pcre.c
r21644 r21772 209 209 210 210 #ifndef SUPPORT_UTF8 211 #define GETCHARINC(c, eptr) c = *eptr++;212 #define GETCHARLEN(c, eptr, len) c = *eptr;213 #define BACKCHAR(eptr)214 215 #else /* SUPPORT_UTF8 */216 217 211 #if PCRE_UTF16 218 219 212 /* Get the next UTF-16 character, advancing the pointer */ 220 221 213 #define LEAD_OFFSET (0xd800 - (0x10000 >> 10)) 222 214 #define SURROGATE_OFFSET (0x10000 - (0xd800 << 10) - 0xdc00) … … 250 242 #define ISMIDCHAR(c) IS_TRAILING_SURROGATE(c) 251 243 252 #else 253 244 #else /* PCRE_UTF16 */ 245 #define GETCHARINC(c, eptr) c = *eptr++; 246 #define GETCHARLEN(c, eptr, len) c = *eptr; 247 #endif /* PCRE_UTF16 */ 248 #define BACKCHAR(eptr) 249 250 #else /* SUPPORT_UTF8 */ 251 252 #if PCRE_UTF16 253 /* Get the next UTF-16 character, advancing the pointer */ 254 #define LEAD_OFFSET (0xd800 - (0x10000 >> 10)) 255 #define SURROGATE_OFFSET (0x10000 - (0xd800 << 10) - 0xdc00) 256 257 #define IS_LEADING_SURROGATE(c) (((c) & ~0x3ff) == 0xd800) 258 #define IS_TRAILING_SURROGATE(c) (((c) & ~0x3ff) == 0xdc00) 259 260 #define DECODE_SURROGATE_PAIR(l, t) (((l) << 10) + (t) + SURROGATE_OFFSET) 261 #define LEADING_SURROGATE(c) (LEAD_OFFSET + ((c) >> 10)) 262 #define TRAILING_SURROGATE(c) (0xdc00 + ((c) & 0x3FF)) 263 264 #define GETCHARINC(c, eptr) \ 265 c = *eptr++; \ 266 if (IS_LEADING_SURROGATE(c)) \ 267 c = DECODE_SURROGATE_PAIR(c, *eptr++); 268 269 /* Get the next UTF-16 character, not advancing the pointer, setting length */ 270 271 #define GETCHARLEN(c, eptr, len) \ 272 c = *eptr; \ 273 if (!IS_LEADING_SURROGATE(c)) \ 274 len = 1; \ 275 else \ 276 { \ 277 c = DECODE_SURROGATE_PAIR(c, eptr[1]); \ 278 len = 2; \ 279 } 280 281 /* Return 1 if not the start of a character. */ 282 283 #define ISMIDCHAR(c) IS_TRAILING_SURROGATE(c) 284 285 #else /* PCRE_UTF16 */ 254 286 /* Get the next UTF-8 character, advancing the pointer */ 255 256 287 #define GETCHARINC(c, eptr) \ 257 288 c = *eptr++; \ … … 291 322 #define ISMIDCHAR(c) (((c) & 0xc0) == 0x80) 292 323 293 #endif 294 324 #endif /* PCRE_UTF16 */ 295 325 /* If the pointer is not at the start of a character, move it back until 296 326 it is. */ 297 298 327 #define BACKCHAR(eptr) while(ISMIDCHAR(*eptr)) eptr--; 299 300 #endif 328 #endif /* SUPPORT_UTF8 */ 329 301 330 302 331 … … 318 347 #endif 319 348 320 321 322 323 #if !PCRE_UTF16324 349 #ifdef SUPPORT_UTF8 325 350 /************************************************* … … 378 403 return i + 1; 379 404 } 380 #endif 381 #endif 382 405 #endif /* SUPPORT_UTF8 */ 383 406 384 407 … … 2640 2663 #endif 2641 2664 2665 #if !NOKIA_CHANGES 2642 2666 /* Can't support UTF8 unless PCRE has been compiled to include the code. */ 2643 2644 2667 #ifndef SUPPORT_UTF8 2645 if ((options & PCRE_UTF8) != 0) 2668 if ((options & PCRE_UTF8) != 0) 2646 2669 { 2647 2670 *errorptr = ERR32; … … 2651 2674 2652 2675 /* Always set the UTF-8 flag if we're compiled for UTF-16; saves on ifdefs. */ 2653 2654 2676 #if PCRE_UTF16 2655 2677 options |= PCRE_UTF8; 2656 2678 #endif 2679 #endif //NOKIA_CHANGES 2657 2680 2658 2681 /* We can't pass back an error message if errorptr is NULL; I guess the best we
Note: See TracChangeset
for help on using the changeset viewer.