460
460
if (mask & NSCaseInsensitiveSearch)
462
#if GSEQ_O == GSEQ_CS || GSEQ_S == GSEQ_CS
463
if (GSPrivateDefaultCStringEncoding() == NSISOLatin1StringEncoding)
465
/* Using latin1 internally, rather than native encoding,
466
* so we can't use native tolower() function.
468
for (i = 0; i < end; i++)
470
unichar c1 = uni_tolower((unichar)sBuf[i]);
471
unichar c2 = uni_tolower((unichar)oBuf[i]);
474
return NSOrderedAscending;
476
return NSOrderedDescending;
481
/* We are not using latin1 encoding internally, so we trust
482
* that the internal encoding matches the native encoding
483
* and the native tolower() function will work.
485
for (i = 0; i < end; i++)
487
#if GSEQ_S == GSEQ_CS
488
unichar c1 = tolower(sBuf[i]);
490
unichar c1 = uni_tolower((unichar)sBuf[i]);
492
#if GSEQ_O == GSEQ_CS
493
unichar c2 = tolower(oBuf[i]);
495
unichar c2 = uni_tolower((unichar)oBuf[i]);
499
return NSOrderedAscending;
501
return NSOrderedDescending;
462
505
for (i = 0; i < end; i++)
464
#if GSEQ_O == GSEQ_CS && GSEQ_S == GSEQ_CS
465
char c1 = tolower(sBuf[i]);
466
char c2 = tolower(oBuf[i]);
468
507
unichar c1 = uni_tolower((unichar)sBuf[i]);
469
508
unichar c2 = uni_tolower((unichar)oBuf[i]);
473
511
return NSOrderedAscending;
475
513
return NSOrderedDescending;