From f996a912af28c71cd3fc5a92a69bd603452dda88 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Sat, 27 Jun 1998 13:23:39 +0000 Subject: [PATCH] rcsid magic --- src/apprentice.c | 3 +-- src/ascmagic.c | 3 +-- src/compress.c | 6 ++++-- src/file.c | 10 +++++----- src/file.h | 11 ++++++++++- src/fsmagic.c | 3 +-- src/internat.c | 4 ++++ src/is_tar.c | 7 ++++++- src/print.c | 5 ++--- src/readelf.c | 4 ++++ src/softmagic.c | 9 ++++----- 11 files changed, 42 insertions(+), 23 deletions(-) diff --git a/src/apprentice.c b/src/apprentice.c index 7d8d9e2e..2819df87 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -33,8 +33,7 @@ #include "file.h" #ifndef lint -static char *moduleid = - "@(#)$Id: apprentice.c,v 1.25 1997/01/15 17:23:24 christos Exp $"; +FILE_RCSID("@(#)$Id: apprentice.c,v 1.26 1998/06/27 13:23:39 christos Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ diff --git a/src/ascmagic.c b/src/ascmagic.c index 17dec1b3..7a3f1ae8 100644 --- a/src/ascmagic.c +++ b/src/ascmagic.c @@ -36,8 +36,7 @@ #include "names.h" #ifndef lint -static char *moduleid = - "@(#)$Id: ascmagic.c,v 1.22 1998/02/15 23:18:53 christos Exp $"; +FILE_RCSID("@(#)$Id: ascmagic.c,v 1.23 1998/06/27 13:23:39 christos Exp $"); #endif /* lint */ /* an optimisation over plain strcmp() */ diff --git a/src/compress.c b/src/compress.c index ed10c5b1..773d70e5 100644 --- a/src/compress.c +++ b/src/compress.c @@ -4,7 +4,6 @@ * information if recognized * uncompress(method, old, n, newch) - uncompress old into new, * using method, return sizeof new - * $Id: compress.c,v 1.10 1998/02/15 23:18:53 christos Exp $ */ #include #include @@ -16,8 +15,11 @@ #ifdef HAVE_SYS_WAIT_H #include #endif - #include "file.h" +#ifndef lint +FILE_RCSID("@(#)$Id: compress.c,v 1.11 1998/06/27 13:23:39 christos Exp $") +#endif + static struct { char *magic; diff --git a/src/file.c b/src/file.c index a2c8d11f..7acd198c 100644 --- a/src/file.c +++ b/src/file.c @@ -24,11 +24,6 @@ * * 4. This notice may not be removed or altered. */ -#ifndef lint -static char *moduleid = - "@(#)$Id: file.c,v 1.39 1998/02/15 23:18:53 christos Exp $"; -#endif /* lint */ - #include #include #include @@ -52,6 +47,11 @@ static char *moduleid = #include "patchlevel.h" #include "file.h" +#ifndef lint +FILE_RCSID("@(#)$Id: file.c,v 1.40 1998/06/27 13:23:39 christos Exp $") +#endif /* lint */ + + #ifdef S_IFLNK # define USAGE "Usage: %s [-vbczL] [-f namefile] [-m magicfiles] file...\n" #else diff --git a/src/file.h b/src/file.h index c2b96547..9bce3129 100644 --- a/src/file.h +++ b/src/file.h @@ -1,6 +1,6 @@ /* * file.h - definitions for file(1) program - * @(#)$Id: file.h,v 1.25 1997/01/15 19:28:35 christos Exp $ + * @(#)$Id: file.h,v 1.26 1998/06/27 13:23:39 christos Exp $ * * Copyright (c) Ian F. Darwin, 1987. * Written by Ian F. Darwin. @@ -147,4 +147,13 @@ extern char *sys_errlist[]; #define MAXPATHLEN 512 #endif +#ifdef __STDC__ +#define FILE_RCSID(id) \ +static const char *rcsid(const char *p) { \ + return rcsid(p = id); \ +} +#else +#define FILE_RCSID(id) static char *rcsid[] = id; +#endif + #endif /* __file_h__ */ diff --git a/src/fsmagic.c b/src/fsmagic.c index 378de243..addbc196 100644 --- a/src/fsmagic.c +++ b/src/fsmagic.c @@ -53,8 +53,7 @@ #include "file.h" #ifndef lint -static char *moduleid = - "@(#)$Id: fsmagic.c,v 1.26 1998/02/15 23:18:53 christos Exp $"; +FILE_RCSID("@(#)$Id: fsmagic.c,v 1.27 1998/06/27 13:23:39 christos Exp $") #endif /* lint */ int diff --git a/src/internat.c b/src/internat.c index a39799ff..26411434 100644 --- a/src/internat.c +++ b/src/internat.c @@ -12,6 +12,10 @@ #include #include +#ifndef lint +FILE_RCSID("@(#)$Id: internat.c,v 1.4 1998/06/27 13:23:39 christos Exp $") +#endif + #define F 0 #define T 1 diff --git a/src/is_tar.c b/src/is_tar.c index 86541041..c905d737 100644 --- a/src/is_tar.c +++ b/src/is_tar.c @@ -5,7 +5,7 @@ * Pubic Domain version written 26 Aug 1985 John Gilmore (ihnp4!hoptoad!gnu). * * @(#)list.c 1.18 9/23/86 Public Domain - gnu - * $Id: is_tar.c,v 1.9 1997/01/15 17:23:24 christos Exp $ + * $Id: is_tar.c,v 1.10 1998/06/27 13:23:39 christos Exp $ * * Comments changed and some code/comments reformatted * for file command by Ian Darwin. @@ -15,6 +15,11 @@ #include #include #include "tar.h" +#include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$Id: is_tar.c,v 1.10 1998/06/27 13:23:39 christos Exp $") +#endif #define isodigit(c) ( ((c) >= '0') && ((c) <= '7') ) diff --git a/src/print.c b/src/print.c index dd7ee83b..e356ed2c 100644 --- a/src/print.c +++ b/src/print.c @@ -39,8 +39,7 @@ #include "file.h" #ifndef lint -static char *moduleid = - "@(#)$Id: print.c,v 1.24 1997/04/13 18:28:30 christos Exp $"; +FILE_RCSID("@(#)$Id: print.c,v 1.25 1998/06/27 13:23:39 christos Exp $") #endif /* lint */ #define SZOF(a) (sizeof(a) / sizeof(a[0])) @@ -68,7 +67,7 @@ struct magic *m; (m->type >= 0 && m->type < SZOF(typ)) ? typ[(unsigned char) m->type] : "*bad*"); - if (m->mask != ~0L) + if (m->mask != ~((uint32)0)) (void) fprintf(stderr, " & %.8x", m->mask); (void) fprintf(stderr, ",%c", m->reln); diff --git a/src/readelf.c b/src/readelf.c index 3ac702d1..7e6d14b4 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -14,6 +14,10 @@ #include "readelf.h" #include "file.h" +#ifndef lint +FILE_RCSID("@(#)$Id: readelf.c,v 1.7 1998/06/27 13:23:39 christos Exp $") +#endif + static void doshn(fd, off, num, size, buf) int fd; diff --git a/src/softmagic.c b/src/softmagic.c index f85042b3..cfb4d6aa 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -37,8 +37,7 @@ #include "file.h" #ifndef lint -static char *moduleid = - "@(#)$Id: softmagic.c,v 1.36 1998/02/15 23:18:53 christos Exp $"; +FILE_RCSID("@(#)$Id: softmagic.c,v 1.37 1998/06/27 13:23:39 christos Exp $") #endif /* lint */ static int match __P((unsigned char *, int)); @@ -199,7 +198,7 @@ struct magic *m; { char *pp, *rt; uint32 v; - time_t time; + time_t curtime; int32 t=0 ; @@ -248,8 +247,8 @@ struct magic *m; case DATE: case BEDATE: case LEDATE: - time = p->l; - pp = ctime(&time); + curtime = p->l; + pp = ctime(&curtime); if ((rt = strchr(pp, '\n')) != NULL) *rt = '\0'; (void) printf(m->desc, pp); -- 2.40.0