From 9f435cf2fe2d97b9f2648977f3ac13266c231539 Mon Sep 17 00:00:00 2001 From: Ian Darwin Date: Wed, 16 Sep 1987 10:11:06 +0000 Subject: [PATCH] Add RCS identifier, #ifndef lint. --- src/apprentice.c | 23 +++++++++++++++-------- src/ascmagic.c | 4 ++++ src/fsmagic.c | 4 +++- src/print.c | 4 ++++ src/softmagic.c | 4 +++- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/apprentice.c b/src/apprentice.c index b593da60..3c526354 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -29,13 +29,17 @@ #include #include "file.h" +#ifndef lint +static char *moduleid = "$Header: /home/glen/git/file/cvs/file/src/apprentice.c,v 1.6 1987/09/16 10:11:06 ian Exp $"; +#endif /* lint */ + #define MAXSTR 500 #define EATAB {while (isascii(*l) && isspace(*l)) ++l;} extern char *progname; extern char *magicfile; -extern int debug, check; /* options */ +extern int debug; /* option */ extern int nmagic; /* number of valid magic[]s */ extern long strtol(); @@ -43,8 +47,9 @@ struct magic magic[MAXMAGIS]; char *getstr(); -apprentice(fn) -char *fn; +apprentice(fn, check) +char *fn; /* name of magic file */ +int check; /* non-zero: checking-only run. */ { FILE *f; char line[MAXSTR+1]; @@ -65,7 +70,7 @@ char *fn; if (strlen(line) <= 1) /* null line, garbage, etc */ continue; line[strlen(line)-1] = '\0'; /* delete newline */ - (void) parse(line, &nmagic); + (void) parse(line, &nmagic, check); } (void) fclose(f); @@ -74,9 +79,9 @@ char *fn; /* * parse one line from magic file, put into magic[index++] if valid */ -parse(l, ndx) +parse(l, ndx, check) char *l; -int *ndx; +int *ndx, check; { int i = 0, nd = *ndx; int slen; @@ -132,8 +137,10 @@ int *ndx; m->reln = '='; EATAB; -/* TODO finish this macro and start using it! */ -#define offsetcheck {if (offset > HOWMANY-1) warning("offset too big"); } +/* + * TODO finish this macro and start using it! + * #define offsetcheck {if (offset > HOWMANY-1) warning("offset too big"); } + */ switch(m->type) { /* * Do not remove the casts below. They are vital. diff --git a/src/ascmagic.c b/src/ascmagic.c index e281742e..fd9c6d1c 100644 --- a/src/ascmagic.c +++ b/src/ascmagic.c @@ -31,6 +31,10 @@ #include "file.h" #include "names.h" +#ifndef lint +static char *moduleid = "$Header: /home/glen/git/file/cvs/file/src/ascmagic.c,v 1.4 1987/09/16 10:11:40 ian Exp $"; +#endif /* lint */ + char ckfmsg[] = "write error on output"; /* an optimisation over plain strcmp() */ diff --git a/src/fsmagic.c b/src/fsmagic.c index 66fb0457..35110fbf 100644 --- a/src/fsmagic.c +++ b/src/fsmagic.c @@ -40,7 +40,9 @@ #include #include "file.h" -#define USAGE "usage: %s [-f file] [-m magicfile] file...\n" +#ifndef lint +static char *moduleid = "$Header: /home/glen/git/file/cvs/file/src/fsmagic.c,v 1.5 1987/09/16 10:11:48 ian Exp $"; +#endif /* lint */ extern char *progname; extern char *ckfmsg, *magicfile; diff --git a/src/print.c b/src/print.c index 676b4a2d..fc8f7568 100644 --- a/src/print.c +++ b/src/print.c @@ -29,6 +29,10 @@ #include #include "file.h" +#ifndef lint +static char *moduleid = "$Header: /home/glen/git/file/cvs/file/src/print.c,v 1.4 1987/09/16 10:11:55 ian Exp $"; +#endif /* lint */ + #define MAXSTR 500 extern char *progname; diff --git a/src/softmagic.c b/src/softmagic.c index 0aa757e6..d6ded6e7 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -28,7 +28,9 @@ #include #include "file.h" -#define USAGE "usage: %s [-f file] [-m magicfile] file...\n" +#ifndef lint +static char *moduleid = "$Header: /home/glen/git/file/cvs/file/src/softmagic.c,v 1.5 1987/09/16 10:12:01 ian Exp $"; +#endif /* lint */ extern char *progname; extern char *magicfile; /* name of current /etc/magic or clone */ -- 2.40.0