=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/unifdef/unifdef.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** src/usr.bin/unifdef/unifdef.c 2002/05/10 19:13:07 1.5 --- src/usr.bin/unifdef/unifdef.c 2002/10/04 20:27:16 1.6 *************** *** 1,4 **** ! /* $OpenBSD: unifdef.c,v 1.5 2002/05/10 19:13:07 jason Exp $ */ /* $NetBSD: unifdef.c,v 1.6 1998/10/08 01:31:59 wsanchez Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: unifdef.c,v 1.6 2002/10/04 20:27:16 deraadt Exp $ */ /* $NetBSD: unifdef.c,v 1.6 1998/10/08 01:31:59 wsanchez Exp $ */ /* *************** *** 47,53 **** #if 0 static char sccsid[] = "@(#)unifdef.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: unifdef.c,v 1.5 2002/05/10 19:13:07 jason Exp $"; #endif /* not lint */ /* --- 47,53 ---- #if 0 static char sccsid[] = "@(#)unifdef.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: unifdef.c,v 1.6 2002/10/04 20:27:16 deraadt Exp $"; #endif /* not lint */ /* *************** *** 66,72 **** #include #include - #define BSS FILE *input; #ifndef YES #define YES 1 --- 66,71 ---- *************** *** 76,105 **** #define CXX_COMMENT 2 typedef int Bool; ! char *progname BSS; ! char *filename BSS; ! char text BSS; /* -t option in effect: this is a text file */ ! char lnblank BSS; /* -l option in effect: blank deleted lines */ ! char complement BSS; /* -c option in effect: complement the * operation */ #define MAXSYMS 100 ! char *symname[MAXSYMS] BSS; /* symbol name */ ! char true[MAXSYMS] BSS; /* -Dsym */ ! char ignore[MAXSYMS] BSS; /* -iDsym or -iUsym */ ! char insym[MAXSYMS] BSS; /* state: false, inactive, true */ #define SYM_INACTIVE 0 /* symbol is currently inactive */ #define SYM_FALSE 1 /* symbol is currently false */ #define SYM_TRUE 2 /* symbol is currently true */ ! char nsyms BSS; ! char incomment BSS; /* inside C comment */ #define QUOTE_NONE 0 #define QUOTE_SINGLE 1 #define QUOTE_DOUBLE 2 ! char inquote BSS; /* inside single or double quotes */ ! int exitstat BSS; int error(int, int, int); int findsym(char *); --- 75,104 ---- #define CXX_COMMENT 2 typedef int Bool; ! char *progname; ! char *filename; ! char text; /* -t option in effect: this is a text file */ ! char lnblank; /* -l option in effect: blank deleted lines */ ! char complement; /* -c option in effect: complement the * operation */ #define MAXSYMS 100 ! char *symname[MAXSYMS]; /* symbol name */ ! char true[MAXSYMS]; /* -Dsym */ ! char ignore[MAXSYMS]; /* -iDsym or -iUsym */ ! char insym[MAXSYMS]; /* state: false, inactive, true */ #define SYM_INACTIVE 0 /* symbol is currently inactive */ #define SYM_FALSE 1 /* symbol is currently false */ #define SYM_TRUE 2 /* symbol is currently true */ ! char nsyms; ! char incomment; /* inside C comment */ #define QUOTE_NONE 0 #define QUOTE_SINGLE 1 #define QUOTE_DOUBLE 2 ! char inquote; /* inside single or double quotes */ ! int exitstat; int error(int, int, int); int findsym(char *); *************** *** 211,224 **** Linetype checkline(int *); typedef int Reject_level; ! Reject_level reject BSS; /* 0 or 1: pass thru; 1 or 2: ignore comments */ #define REJ_NO 0 #define REJ_IGNORE 1 #define REJ_YES 2 int doif(int, int, Reject_level, int); ! int linenum BSS; /* current line number */ ! int stqcline BSS; /* start of current coment or quote */ char *errs[] = { #define NO_ERR 0 "", --- 210,223 ---- Linetype checkline(int *); typedef int Reject_level; ! Reject_level reject; /* 0 or 1: pass thru; 1 or 2: ignore comments */ #define REJ_NO 0 #define REJ_IGNORE 1 #define REJ_YES 2 int doif(int, int, Reject_level, int); ! int linenum; /* current line number */ ! int stqcline; /* start of current coment or quote */ char *errs[] = { #define NO_ERR 0 "", *************** *** 357,363 **** #define endsym(c) (!isalpha (c) && !isdigit (c) && c != '_') #define MAXLINE 256 ! char tline[MAXLINE] BSS; Linetype checkline(cursym) --- 356,362 ---- #define endsym(c) (!isalpha (c) && !isdigit (c) && c != '_') #define MAXLINE 256 ! char tline[MAXLINE]; Linetype checkline(cursym) *************** *** 574,580 **** int chr; #ifdef FFSPECIAL static char havechar = NO; /* have leftover char from last time */ ! static char svchar BSS; #endif /* FFSPECIAL */ num = 0; --- 573,579 ---- int chr; #ifdef FFSPECIAL static char havechar = NO; /* have leftover char from last time */ ! static char svchar; #endif /* FFSPECIAL */ num = 0;