Changeset 3441:f78b184ef598 for intl

Show
Ignore:
Timestamp:
2003-07-24 11:40:50 (5 years ago)
Author:
Vincent Lefevre <vincent@…>
Branch:
HEAD
Message:

Some functions/macros like isspace take an int and require the
argument to have the value of an unsigned char (or EOF). Under
Solaris, gcc complains when the argument is a char (as this is a
possible bug, on platforms where char is signed, like Solaris). The
attached patch fixes such problems (well, perhaps I've changed more
than necessary, but this doesn't hurt).

Location:
intl
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • intl/l10nflist.c

    r2769 r3441  
    357357 
    358358  for (cnt = 0; cnt < name_len; ++cnt) 
    359     if (isalnum (codeset[cnt])) 
     359    if (isalnum ((unsigned char) codeset[cnt])) 
    360360      { 
    361361        ++len; 
    362362 
    363         if (isalpha (codeset[cnt])) 
     363        if (isalpha ((unsigned char) codeset[cnt])) 
    364364          only_digit = 0; 
    365365      } 
     
    375375 
    376376      for (cnt = 0; cnt < name_len; ++cnt) 
    377         if (isalpha (codeset[cnt])) 
    378           *wp++ = tolower (codeset[cnt]); 
    379         else if (isdigit (codeset[cnt])) 
     377        if (isalpha ((unsigned char) codeset[cnt])) 
     378          *wp++ = tolower ((unsigned char) codeset[cnt]); 
     379        else if (isdigit ((unsigned char) codeset[cnt])) 
    380380          *wp++ = codeset[cnt]; 
    381381 
  • intl/loadmsgcat.c

    r2769 r3441  
    509509 
    510510          nplurals += 9; 
    511           while (*nplurals != '\0' && isspace (*nplurals)) 
     511          while (*nplurals != '\0' && isspace ((unsigned char) *nplurals)) 
    512512            ++nplurals; 
    513513#if defined HAVE_STRTOUL || defined _LIBC 
  • intl/localealias.c

    r2769 r3441  
    245245      cp = buf; 
    246246      /* Ignore leading white space.  */ 
    247       while (isspace (cp[0])) 
     247      while (isspace ((unsigned char) cp[0])) 
    248248        ++cp; 
    249249 
     
    252252        { 
    253253          alias = cp++; 
    254           while (cp[0] != '\0' && !isspace (cp[0])) 
     254          while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) 
    255255            ++cp; 
    256256          /* Terminate alias name.  */ 
     
    259259 
    260260          /* Now look for the beginning of the value.  */ 
    261           while (isspace (cp[0])) 
     261          while (isspace ((unsigned char) cp[0])) 
    262262            ++cp; 
    263263 
     
    268268 
    269269              value = cp++; 
    270               while (cp[0] != '\0' && !isspace (cp[0])) 
     270              while (cp[0] != '\0' && !isspace ((unsigned char) cp[0])) 
    271271                ++cp; 
    272272              /* Terminate value.  */