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

Diff for /src/usr.bin/unifdef/unifdef.c between version 1.10 and 1.11

version 1.10, 2003/06/03 02:56:21 version 1.11, 2003/06/30 18:37:48
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*  /*
    * Copyright (c) 2002, 2003 Tony Finch <dot@dotat.at>
  * Copyright (c) 1985, 1993   * Copyright (c) 1985, 1993
  *      The Regents of the University of California.  All rights reserved.   *      The Regents of the University of California.  All rights reserved.
  *   *
Line 216 
Line 217 
 {  {
         int opt;          int opt;
   
         while ((opt = getopt(argc, argv, "i:D:U:cdeklst")) != -1)          while ((opt = getopt(argc, argv, "i:D:U:I:cdeklst")) != -1)
                 switch (opt) {                  switch (opt) {
                 case 'i': /* treat stuff controlled by these symbols as text */                  case 'i': /* treat stuff controlled by these symbols as text */
                         /*                          /*
Line 238 
Line 239 
                 case 'U': /* undef a symbol */                  case 'U': /* undef a symbol */
                         addsym(false, false, optarg);                          addsym(false, false, optarg);
                         break;                          break;
                   case 'I':
                           /* no-op for compatibility with cpp */
                           break;
                 case 'c': /* treat -D as -U and vice versa */                  case 'c': /* treat -D as -U and vice versa */
                         complement = true;                          complement = true;
                         break;                          break;
Line 981 
Line 985 
   
 /*  /*
  * Skip over comments and stop at the next character position that is   * Skip over comments and stop at the next character position that is
  * not whitespace. Between calls we keep the comment state in a global   * not whitespace. Between calls we keep the comment state in the
  * variable, and we also make a note when we get a proper end-of-line.   * global variable incomment, and we also adjust the global variable
    * linestate when we see a newline.
  * XXX: doesn't cope with the buffer splitting inside a state transition.   * XXX: doesn't cope with the buffer splitting inside a state transition.
  */   */
 static const char *  static const char *
 skipcomment(const char *cp)  skipcomment(const char *cp)
 {  {
         if (text || ignoring[depth]) {          if (text || ignoring[depth]) {
                 while (isspace((unsigned char)*cp))                  for (; isspace((unsigned char)*cp); cp++)
                         cp += 1;                          if (*cp == '\n')
                                   linestate = LS_START;
                 return (cp);                  return (cp);
         }          }
         while (*cp != '\0')          while (*cp != '\0')

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11