[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.5 and 1.6

version 1.5, 2002/05/10 19:13:07 version 1.6, 2002/10/04 20:27:16
Line 66 
Line 66 
 #include <stdio.h>  #include <stdio.h>
 #include <ctype.h>  #include <ctype.h>
   
 #define BSS  
 FILE   *input;  FILE   *input;
 #ifndef YES  #ifndef YES
 #define YES 1  #define YES 1
Line 76 
Line 75 
 #define CXX_COMMENT 2  #define CXX_COMMENT 2
 typedef int Bool;  typedef int Bool;
   
 char   *progname BSS;  char   *progname;
 char   *filename BSS;  char   *filename;
 char text BSS;                  /* -t option in effect: this is a text file */  char text;                      /* -t option in effect: this is a text file */
 char lnblank BSS;               /* -l option in effect: blank deleted lines */  char lnblank;                   /* -l option in effect: blank deleted lines */
 char complement BSS;            /* -c option in effect: complement the  char complement;                /* -c option in effect: complement the
                                  * operation */                                   * operation */
   
 #define MAXSYMS 100  #define MAXSYMS 100
 char   *symname[MAXSYMS] BSS;   /* symbol name */  char   *symname[MAXSYMS];       /* symbol name */
 char    true[MAXSYMS] BSS;      /* -Dsym */  char    true[MAXSYMS];          /* -Dsym */
 char    ignore[MAXSYMS] BSS;    /* -iDsym or -iUsym */  char    ignore[MAXSYMS];        /* -iDsym or -iUsym */
 char    insym[MAXSYMS] BSS;     /* state: false, inactive, true */  char    insym[MAXSYMS];         /* state: false, inactive, true */
 #define SYM_INACTIVE 0          /* symbol is currently inactive */  #define SYM_INACTIVE 0          /* symbol is currently inactive */
 #define SYM_FALSE    1          /* symbol is currently false */  #define SYM_FALSE    1          /* symbol is currently false */
 #define SYM_TRUE     2          /* symbol is currently true  */  #define SYM_TRUE     2          /* symbol is currently true  */
   
 char nsyms BSS;  char nsyms;
 char incomment BSS;             /* inside C comment */  char incomment;                 /* inside C comment */
   
 #define QUOTE_NONE   0  #define QUOTE_NONE   0
 #define QUOTE_SINGLE 1  #define QUOTE_SINGLE 1
 #define QUOTE_DOUBLE 2  #define QUOTE_DOUBLE 2
 char inquote BSS;               /* inside single or double quotes */  char inquote;                   /* inside single or double quotes */
 int exitstat BSS;  int exitstat;
   
 int error(int, int, int);  int error(int, int, int);
 int findsym(char *);  int findsym(char *);
Line 211 
Line 210 
 Linetype checkline(int *);  Linetype checkline(int *);
   
 typedef int Reject_level;  typedef int Reject_level;
 Reject_level reject BSS;        /* 0 or 1: pass thru; 1 or 2: ignore comments */  Reject_level reject;            /* 0 or 1: pass thru; 1 or 2: ignore comments */
 #define REJ_NO          0  #define REJ_NO          0
 #define REJ_IGNORE      1  #define REJ_IGNORE      1
 #define REJ_YES         2  #define REJ_YES         2
 int doif(int, int, Reject_level, int);  int doif(int, int, Reject_level, int);
   
 int linenum BSS;                /* current line number */  int linenum;                    /* current line number */
 int stqcline BSS;               /* start of current coment or quote */  int stqcline;                   /* start of current coment or quote */
 char   *errs[] = {  char   *errs[] = {
 #define NO_ERR      0  #define NO_ERR      0
         "",          "",
Line 357 
Line 356 
 #define endsym(c) (!isalpha (c) && !isdigit (c) && c != '_')  #define endsym(c) (!isalpha (c) && !isdigit (c) && c != '_')
   
 #define MAXLINE 256  #define MAXLINE 256
 char    tline[MAXLINE] BSS;  char    tline[MAXLINE];
   
 Linetype  Linetype
 checkline(cursym)  checkline(cursym)
Line 574 
Line 573 
         int chr;          int chr;
 #ifdef  FFSPECIAL  #ifdef  FFSPECIAL
         static char havechar = NO;      /* have leftover char from last time */          static char havechar = NO;      /* have leftover char from last time */
         static char svchar BSS;          static char svchar;
 #endif                          /* FFSPECIAL */  #endif                          /* FFSPECIAL */
   
         num = 0;          num = 0;

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