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

Side by Side Diff: fusl/src/locale/iconv.c

Issue 1575153003: Remove -Wno-logical-op-parentheses for fusl build (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
1 #include <iconv.h> 1 #include <iconv.h>
2 #include <errno.h> 2 #include <errno.h>
3 #include <wchar.h> 3 #include <wchar.h>
4 #include <string.h> 4 #include <string.h>
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits.h> 6 #include <limits.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 #include "locale_impl.h" 8 #include "locale_impl.h"
9 9
10 #define UTF_32BE 0300 10 #define UTF_32BE 0300
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 break; 332 break;
333 case EUC_KR: 333 case EUC_KR:
334 l = 2; 334 l = 2;
335 if (*inb < 2) goto starved; 335 if (*inb < 2) goto starved;
336 d = *((unsigned char *)*in + 1); 336 d = *((unsigned char *)*in + 1);
337 c -= 0xa1; 337 c -= 0xa1;
338 d -= 0xa1; 338 d -= 0xa1;
339 if (c >= 93 || d >= 94) { 339 if (c >= 93 || d >= 94) {
340 c += (0xa1-0x81); 340 c += (0xa1-0x81);
341 d += 0xa1; 341 d += 0xa1;
342 » » » » if (c >= 93 || c>=0xc6-0x81 && d>0x52) 342 » » » » if (c >= 93 || (c>=0xc6-0x81 && d>0x52))
343 goto ilseq; 343 goto ilseq;
344 if (d-'A'<26) d = d-'A'; 344 if (d-'A'<26) d = d-'A';
345 else if (d-'a'<26) d = d-'a'+26; 345 else if (d-'a'<26) d = d-'a'+26;
346 else if (d-0x81<0xff-0x81) d = d-0x81+52; 346 else if (d-0x81<0xff-0x81) d = d-0x81+52;
347 else goto ilseq; 347 else goto ilseq;
348 if (c < 0x20) c = 178*c + d; 348 if (c < 0x20) c = 178*c + d;
349 else c = 178*0x20 + 84*(c-0x20) + d; 349 else c = 178*0x20 + 84*(c-0x20) + d;
350 c += 0xac00; 350 c += 0xac00;
351 for (d=0xac00; d<=c; ) { 351 for (d=0xac00; d<=c; ) {
352 k = 0; 352 k = 0;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 x = -1; 446 x = -1;
447 goto end; 447 goto end;
448 starved: 448 starved:
449 err = EINVAL; 449 err = EINVAL;
450 x = -1; 450 x = -1;
451 end: 451 end:
452 errno = err; 452 errno = err;
453 *ploc = loc; 453 *ploc = loc;
454 return x; 454 return x;
455 } 455 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698