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

Diff for /src/usr.bin/less/opttbl.c between version 1.16 and 1.17

version 1.16, 2015/11/12 03:13:37 version 1.17, 2015/11/12 17:09:57
Line 466 
Line 466 
 }  }
   
 /*  /*
  *  
  */  
 static int  
 is_optchar(unsigned char c)  
 {  
         if (isupper(c) || islower(c) || c == '-')  
                 return (1);  
         else  
                 return (0);  
 }  
   
 /*  
  * Find an option in the option table, given its option name.   * Find an option in the option table, given its option name.
  * p_optname is the (possibly partial) name to look for, and   * p_optname is the (possibly partial) name to look for, and
  * is updated to point after the matched name.   * is updated to point after the matched name.
Line 512 
Line 500 
                          */                           */
                         for (uppercase = 0;  uppercase <= 1;  uppercase++) {                          for (uppercase = 0;  uppercase <= 1;  uppercase++) {
                                 len = sprefix(optname, oname->oname, uppercase);                                  len = sprefix(optname, oname->oname, uppercase);
                                 if (len <= 0 || is_optchar(optname[len])) {                                  if (len <= 0 ||
                                       isupper((unsigned char)optname[len]) ||
                                       islower((unsigned char)optname[len]) ||
                                       optname[len] == '-') {
                                         /*                                          /*
                                          * We didn't use all of the option name.                                           * We didn't use all of the option name.
                                          */                                           */

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17