From: Christos Zoulas Date: Tue, 4 Nov 2008 16:38:28 +0000 (+0000) Subject: make sure that we always include "file.h" first which includes config.h X-Git-Tag: FILE5_05~291 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1cd0f6c387665db4e815ce353977ac9165f69d1;p=file make sure that we always include "file.h" first which includes config.h and add rcsid's to all files. --- diff --git a/src/apprentice.c b/src/apprentice.c index 5dc3e697..0930a6ca 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -30,6 +30,11 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: apprentice.c,v 1.144 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include "magic.h" #include "patchlevel.h" #include @@ -48,10 +53,6 @@ #include #include -#ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.143 2008/10/30 10:54:07 rrt Exp $") -#endif /* lint */ - #define EATAB {while (isascii((unsigned char) *l) && \ isspace((unsigned char) *l)) ++l;} #define LOWCASE(l) (isupper((unsigned char) (l)) ? \ diff --git a/src/apptype.c b/src/apptype.c index da03f803..83e7f21e 100644 --- a/src/apptype.c +++ b/src/apptype.c @@ -24,16 +24,16 @@ * */ -#include -#include -#include - #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apptype.c,v 1.8 2008/08/31 07:58:00 christos Exp $") +FILE_RCSID("@(#)$File: apptype.c,v 1.9 2008/11/04 16:38:28 christos Exp $") #endif /* lint */ +#include +#include +#include + #ifdef __EMX__ #include #define INCL_DOSSESMGR diff --git a/src/ascmagic.c b/src/ascmagic.c index 652b5b68..f07cb3fd 100644 --- a/src/ascmagic.c +++ b/src/ascmagic.c @@ -37,6 +37,11 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: ascmagic.c,v 1.69 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include "magic.h" #include #include @@ -48,10 +53,6 @@ #endif #include "names.h" -#ifndef lint -FILE_RCSID("@(#)$File: ascmagic.c,v 1.68 2008/10/30 10:50:24 rrt Exp $") -#endif /* lint */ - #define MAXLINELEN 300 /* longest sane line length */ #define ISSPC(x) ((x) == ' ' || (x) == '\t' || (x) == '\r' || (x) == '\n' \ || (x) == 0x85 || (x) == '\f') diff --git a/src/asprintf.c b/src/asprintf.c index c103cf18..aadddbb6 100644 --- a/src/asprintf.c +++ b/src/asprintf.c @@ -26,6 +26,12 @@ * SUCH DAMAGE. */ +#include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: asprintf.c,v 1.2 2008/11/04 16:38:28 christos Exp $") +#endif + #include int vasprintf(char **ptr, const char *format_string, va_list vargs); diff --git a/src/cdf.c b/src/cdf.c index a51c54f3..d264f16b 100644 --- a/src/cdf.c +++ b/src/cdf.c @@ -29,8 +29,10 @@ * Info from: http://sc.openoffice.org/compdocfileformat.pdf */ -#ifdef HAVE_CONFIG_H -#include +#include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: cdf.c,v 1.12 2008/11/04 16:38:28 christos Exp $") #endif #include @@ -58,11 +60,6 @@ #include "cdf.h" -#include "file.h" -#ifndef lint -FILE_RCSID("@(#)$File: cdf.c,v 1.11 2008/11/03 05:34:27 christos Exp $") -#endif - #ifndef __arraycount #define __arraycount(a) (sizeof(a) / sizeof(a[0])) #endif diff --git a/src/cdf_time.c b/src/cdf_time.c index b74cd305..2ce199a0 100644 --- a/src/cdf_time.c +++ b/src/cdf_time.c @@ -23,8 +23,11 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -#include + +#include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: cdf_time.c,v 1.4 2008/11/04 16:38:28 christos Exp $") #endif #include diff --git a/src/compress.c b/src/compress.c index 5867ac94..ed58df17 100644 --- a/src/compress.c +++ b/src/compress.c @@ -33,6 +33,11 @@ * using method, return sizeof new */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: compress.c,v 1.58 2008/11/04 16:38:28 christos Exp $") +#endif + #include "magic.h" #include #include @@ -54,11 +59,6 @@ #include #endif - -#ifndef lint -FILE_RCSID("@(#)$File: compress.c,v 1.57 2008/07/16 18:00:57 christos Exp $") -#endif - private const struct { const char magic[8]; size_t maglen; diff --git a/src/file.c b/src/file.c index ab3e6c59..e0cd74d4 100644 --- a/src/file.c +++ b/src/file.c @@ -30,6 +30,11 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: file.c,v 1.127 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include "magic.h" #include @@ -73,11 +78,6 @@ int getopt_long(int argc, char * const *argv, const char *optstring, const struc #include "patchlevel.h" -#ifndef lint -FILE_RCSID("@(#)$File: file.c,v 1.126 2008/10/18 20:47:48 christos Exp $") -#endif /* lint */ - - #ifdef S_IFLNK #define SYMLINKFLAG "Lh" #else diff --git a/src/fsmagic.c b/src/fsmagic.c index d643f1f1..0ea61549 100644 --- a/src/fsmagic.c +++ b/src/fsmagic.c @@ -30,6 +30,11 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: fsmagic.c,v 1.55 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include "magic.h" #include #ifdef HAVE_UNISTD_H @@ -56,10 +61,6 @@ #endif #undef HAVE_MAJOR -#ifndef lint -FILE_RCSID("@(#)$File: fsmagic.c,v 1.54 2008/10/18 20:47:48 christos Exp $") -#endif /* lint */ - private int bad_link(struct magic_set *ms, int err, char *buf) { diff --git a/src/funcs.c b/src/funcs.c index bbe152c1..bb9bb4f1 100644 --- a/src/funcs.c +++ b/src/funcs.c @@ -25,6 +25,11 @@ * SUCH DAMAGE. */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: funcs.c,v 1.47 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include "magic.h" #include #include @@ -40,10 +45,6 @@ #include #endif -#ifndef lint -FILE_RCSID("@(#)$File: funcs.c,v 1.46 2008/10/16 16:30:34 christos Exp $") -#endif /* lint */ - #ifndef SIZE_MAX #define SIZE_MAX ((size_t)~0) #endif diff --git a/src/getopt_long.c b/src/getopt_long.c index 5b9c20b4..97de4c3b 100644 --- a/src/getopt_long.c +++ b/src/getopt_long.c @@ -29,9 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: getopt_long.c,v 1.4 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include #ifdef HAVE_ERR_H #include diff --git a/src/is_tar.c b/src/is_tar.c index 6ba15a5e..5d17b79a 100644 --- a/src/is_tar.c +++ b/src/is_tar.c @@ -38,16 +38,17 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: is_tar.c,v 1.34 2008/11/04 16:38:28 christos Exp $") +#endif + #include "magic.h" #include #include #include #include "tar.h" -#ifndef lint -FILE_RCSID("@(#)$File: is_tar.c,v 1.33 2008/11/03 06:18:34 rrt Exp $") -#endif - #define isodigit(c) ( ((c) >= '0') && ((c) <= '7') ) private int is_tar(const unsigned char *, size_t); diff --git a/src/magic.c b/src/magic.c index 55dfee1b..644ecb04 100644 --- a/src/magic.c +++ b/src/magic.c @@ -26,6 +26,11 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: magic.c,v 1.55 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include "magic.h" #include @@ -64,10 +69,6 @@ #include "patchlevel.h" -#ifndef lint -FILE_RCSID("@(#)$File: magic.c,v 1.54 2008/07/25 23:30:32 rrt Exp $") -#endif /* lint */ - #ifndef PIPE_BUF /* Get the PIPE_BUF from pathconf */ #ifdef _PC_PIPE_BUF diff --git a/src/print.c b/src/print.c index cb382b0c..ced93164 100644 --- a/src/print.c +++ b/src/print.c @@ -30,6 +30,11 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: print.c,v 1.65 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include #include #include @@ -40,10 +45,6 @@ #endif #include -#ifndef lint -FILE_RCSID("@(#)$File: print.c,v 1.64 2008/10/20 15:14:17 christos Exp $") -#endif /* lint */ - #define SZOF(a) (sizeof(a) / sizeof(a[0])) #ifndef COMPILE_ONLY diff --git a/src/readelf.c b/src/readelf.c index 31b36311..6f0b328c 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -26,6 +26,10 @@ */ #include "file.h" +#ifndef lint +FILE_RCSID("@(#)$File: readelf.c,v 1.81 2008/11/04 16:38:28 christos Exp $") +#endif + #ifdef BUILTIN_ELF #include #include @@ -37,10 +41,6 @@ #include "readelf.h" #include "magic.h" -#ifndef lint -FILE_RCSID("@(#)$File: readelf.c,v 1.80 2008/10/18 20:47:48 christos Exp $") -#endif - #ifdef ELFCORE private int dophn_core(struct magic_set *, int, int, int, off_t, int, size_t, off_t, int *); diff --git a/src/softmagic.c b/src/softmagic.c index 7b01ee6e..a337dd17 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -30,6 +30,11 @@ */ #include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: softmagic.c,v 1.126 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ + #include "magic.h" #include #include @@ -37,10 +42,6 @@ #include -#ifndef lint -FILE_RCSID("@(#)$File: softmagic.c,v 1.125 2008/10/30 10:43:49 rrt Exp $") -#endif /* lint */ - private int match(struct magic_set *, struct magic *, uint32_t, const unsigned char *, size_t, int); private int mget(struct magic_set *, const unsigned char *, diff --git a/src/vasprintf.c b/src/vasprintf.c index 0289c0d8..3ca63a3a 100644 --- a/src/vasprintf.c +++ b/src/vasprintf.c @@ -105,9 +105,11 @@ A buffer overflow can only occur if your sprintf() do strange things or when you use strange formats. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif +#include "file.h" + +#ifndef lint +FILE_RCSID("@(#)$File: vasprintf.c,v 1.6 2008/11/04 16:38:28 christos Exp $") +#endif /* lint */ #include #include