[BACK]Return to misc.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / lex

Diff for /src/usr.bin/lex/misc.c between version 1.18 and 1.19

version 1.18, 2015/11/19 23:20:34 version 1.19, 2015/11/19 23:34:56
Line 195 
Line 195 
         char *str;          char *str;
 {  {
         while (*str) {          while (*str) {
                 if (!isascii((Char) * str) || !islower((Char) * str))                  if (!isascii((u_char) * str) || !islower((u_char) * str))
                         return 0;                          return 0;
                 ++str;                  ++str;
         }          }
Line 211 
Line 211 
         char *str;          char *str;
 {  {
         while (*str) {          while (*str) {
                 if (!isascii((Char) * str) || !isupper((Char) * str))                  if (!isascii((u_char) * str) || !isupper((u_char) * str))
                         return 0;                          return 0;
                 ++str;                  ++str;
         }          }
Line 252 
Line 252 
   
 /* clower - replace upper-case letter to lower-case */  /* clower - replace upper-case letter to lower-case */
   
 Char  u_char
 clower(c)  clower(c)
         int c;          int c;
 {  {
         return (Char) ((isascii(c) && isupper(c)) ? tolower(c) : c);          return (u_char) ((isascii(c) && isupper(c)) ? tolower(c) : c);
 }  }
   
   
Line 291 
Line 291 
  *    returns a dynamically allocated copy of a (potentially) unsigned string   *    returns a dynamically allocated copy of a (potentially) unsigned string
  */   */
   
 Char *  u_char *
 copy_unsigned_string(str)  copy_unsigned_string(str)
         Char *str;          u_char *str;
 {  {
         Char *c;          u_char *c;
         Char *copy;          u_char *copy;
   
         /* find length */          /* find length */
         for (c = str; *c; ++c);          for (c = str; *c; ++c);
Line 314 
Line 314 
 int  int
 cclcmp(const void *a, const void *b)  cclcmp(const void *a, const void *b)
 {  {
         if (!*(const Char *) a)          if (!*(const u_char *) a)
                 return 1;                  return 1;
         else if (!*(const Char *) b)          else if (!*(const u_char *) b)
                 return -1;                  return -1;
         else          else
                 return *(const Char *) a - *(const Char *) b;                  return *(const u_char *) a - *(const u_char *) b;
 }  }
   
   
Line 393 
Line 393 
   
 int  int
 htoi(str)  htoi(str)
         Char str[];          u_char str[];
 {  {
         unsigned int result;          unsigned int result;
   
Line 594 
Line 594 
   
 /* myesc - return character corresponding to escape sequence */  /* myesc - return character corresponding to escape sequence */
   
 Char  u_char
 myesc(array)  myesc(array)
         Char array[];          u_char array[];
 {  {
         Char c, esc_char;          u_char c, esc_char;
   
         switch (array[1]) {          switch (array[1]) {
         case 'b':          case 'b':
Line 687 
Line 687 
   
 int  int
 otoi(str)  otoi(str)
         Char str[];          u_char str[];
 {  {
         unsigned int result;          unsigned int result;
   

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19