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

Diff for /src/usr.bin/whatis/Attic/whatis.c between version 1.14 and 1.15

version 1.14, 2013/11/15 22:20:04 version 1.15, 2013/11/26 19:25:39
Line 170 
Line 170 
                 return(0);                  return(0);
         for (len = strlen(str);;) {          for (len = strlen(str);;) {
                 /* skip leading crud */                  /* skip leading crud */
                 for (; *bp && !isalnum(*bp); ++bp)                  for (; *bp && !isalnum((unsigned char)*bp); ++bp)
                         ;                          ;
                 if (!*bp)                  if (!*bp)
                         break;                          break;
   
                 /* check for word match first */                  /* check for word match first */
                 for (start = bp++; *bp == '_' || isalnum(*bp); ++bp)                  for (start = bp++; *bp == '_' || isalnum((unsigned char)*bp); ++bp)
                         ;                          ;
                 if (bp - start == len) {                  if (bp - start == len) {
                     if (strncasecmp(start, str, len) == 0)                      if (strncasecmp(start, str, len) == 0)
Line 184 
Line 184 
                 } else if (*bp && *bp != ',') {                  } else if (*bp && *bp != ',') {
                     /* check for full string match */                      /* check for full string match */
                     for (bp = start;                      for (bp = start;
                         *bp && *bp != ',' && *bp != '(' && !isspace(*bp); ++bp)                          *bp && *bp != ',' && *bp != '(' &&
                           !isspace((unsigned char)*bp); ++bp)
                             ;                              ;
                     if (bp - start == len && strncasecmp(start, str, len) == 0)                      if (bp - start == len && strncasecmp(start, str, len) == 0)
                             return(1);                              return(1);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15