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

Diff for /src/usr.bin/ctags/C.c between version 1.4 and 1.5

version 1.4, 1997/07/21 23:18:45 version 1.5, 2000/07/25 19:28:30
Line 101 
Line 101 
                          * the above 3 cases are similar in that they                           * the above 3 cases are similar in that they
                          * are special characters that also end tokens.                           * are special characters that also end tokens.
                          */                           */
         endtok:                 if (sp > tok) {  endtok:                 if (sp > tok) {
                                 *sp = EOS;                                  *sp = EOS;
                                 token = YES;                                  token = YES;
                                 sp = tok;                                  sp = tok;
Line 246 
Line 246 
                                 sp = tok;                                  sp = tok;
                         }                          }
                         else if (sp != tok || begtoken(c)) {                          else if (sp != tok || begtoken(c)) {
                                 *sp++ = c;                                  if (sp >= tok + sizeof tok) {
                                           /* hell... truncate it */
                                           if (sp == tok + sizeof(tok))
                                                   *sp = '\0';
                                           sp++;
                                   } else
                                           *sp++ = c;
                                 token = YES;                                  token = YES;
                         }                          }
                         continue;                          continue;
Line 347 
Line 353 
                         return;                          return;
                 if (iswhite(c))                  if (iswhite(c))
                         break;                          break;
                 *sp++ = c;                  if (sp >= tok + sizeof(tok)) {
                           /* hell... truncate it */
                           if (sp == tok + sizeof(tok))
                                   *sp = '\0';
                           sp++;
                   } else
                           *sp++ = c;
         }          }
         *sp = EOS;          *sp = EOS;
         if (memcmp(tok, "define", 6))   /* only interested in #define's */          if (memcmp(tok, "define", 6))   /* only interested in #define's */
Line 359 
Line 371 
                         break;                          break;
         }          }
         for (sp = tok;;) {              /* get next token */          for (sp = tok;;) {              /* get next token */
                 *sp++ = c;                  if (sp >= tok + sizeof tok) {
                           /* hell... truncate it */
                           if (sp == tok + sizeof(tok))
                                   *sp = '\0';
                           sp++;
                   } else
                           *sp++ = c;
                 if (GETC(==, EOF))                  if (GETC(==, EOF))
                         return;                          return;
                 /*                  /*
Line 401 
Line 419 
         if (c == '{')           /* it was "struct {" */          if (c == '{')           /* it was "struct {" */
                 return (YES);                  return (YES);
         for (sp = tok;;) {              /* get next token */          for (sp = tok;;) {              /* get next token */
                 *sp++ = c;                  if (sp >= tok + sizeof tok) {
                           /* hell... truncate it */
                           if (sp == tok + sizeof(tok))
                                   *sp = '\0';
                           sp++;
                   } else
                           *sp++ = c;
                 if (GETC(==, EOF))                  if (GETC(==, EOF))
                         return (NO);                          return (NO);
                 if (!intoken(c))                  if (!intoken(c))

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5