~ubuntu-branches/ubuntu/utopic/gnustep-base/utopic

« back to all changes in this revision

Viewing changes to Source/GSeq.h

  • Committer: Package Import Robot
  • Author(s): Paul Gevers
  • Date: 2014-07-19 13:02:18 UTC
  • mfrom: (20.1.6 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20140719130218-pn967l7wzjjf90yi
Tags: 1.24.6-2ubuntu1
* debian/rules:
  - Print the config.log if configure fails to debug
    powerpc/ppc64el FTBFS. (LP: #1277975)

Show diffs side-by-side

added added

removed removed

Lines of Context:
459
459
 
460
460
      if (mask & NSCaseInsensitiveSearch)
461
461
        {
 
462
#if     GSEQ_O == GSEQ_CS || GSEQ_S == GSEQ_CS
 
463
          if (GSPrivateDefaultCStringEncoding() == NSISOLatin1StringEncoding)
 
464
            {
 
465
              /* Using latin1 internally, rather than native encoding,
 
466
               * so we can't use native tolower() function.
 
467
               */
 
468
              for (i = 0; i < end; i++)
 
469
                {
 
470
                  unichar       c1 = uni_tolower((unichar)sBuf[i]);
 
471
                  unichar       c2 = uni_tolower((unichar)oBuf[i]);
 
472
 
 
473
                  if (c1 < c2)
 
474
                    return NSOrderedAscending;
 
475
                  if (c1 > c2)
 
476
                    return NSOrderedDescending;
 
477
                }
 
478
            }
 
479
          else
 
480
            {
 
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.
 
484
               */
 
485
              for (i = 0; i < end; i++)
 
486
                {
 
487
#if     GSEQ_S == GSEQ_CS
 
488
                  unichar       c1 = tolower(sBuf[i]);
 
489
#else
 
490
                  unichar       c1 = uni_tolower((unichar)sBuf[i]);
 
491
#endif
 
492
#if     GSEQ_O == GSEQ_CS
 
493
                  unichar       c2 = tolower(oBuf[i]);
 
494
#else
 
495
                  unichar       c2 = uni_tolower((unichar)oBuf[i]);
 
496
#endif
 
497
 
 
498
                  if (c1 < c2)
 
499
                    return NSOrderedAscending;
 
500
                  if (c1 > c2)
 
501
                    return NSOrderedDescending;
 
502
                }
 
503
            }
 
504
#else
462
505
          for (i = 0; i < end; i++)
463
506
            {
464
 
#if     GSEQ_O == GSEQ_CS && GSEQ_S == GSEQ_CS
465
 
              char      c1 = tolower(sBuf[i]);
466
 
              char      c2 = tolower(oBuf[i]);
467
 
#else
468
507
              unichar   c1 = uni_tolower((unichar)sBuf[i]);
469
508
              unichar   c2 = uni_tolower((unichar)oBuf[i]);
470
 
#endif
471
509
 
472
510
              if (c1 < c2)
473
511
                return NSOrderedAscending;
474
512
              if (c1 > c2)
475
513
                return NSOrderedDescending;
476
514
            }
 
515
#endif
477
516
        }
478
517
      else
479
518
        {