#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.146 2008/11/07 18:57:08 christos Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.147 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
#include <assert.h>
#include <ctype.h>
#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/param.h>
#ifdef QUICK
#include <sys/mman.h>
#endif
-#include <sys/types.h>
#include <dirent.h>
#define EATAB {while (isascii((unsigned char) *l) && \
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: apptype.c,v 1.9 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: apptype.c,v 1.10 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: ascmagic.c,v 1.74 2008/11/07 19:10:25 christos Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.75 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
-#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <ctype.h>
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: asprintf.c,v 1.2 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: asprintf.c,v 1.3 2009/02/03 20:27:51 christos Exp $")
#endif
-#include <stdarg.h>
-
int vasprintf(char **ptr, const char *format_string, va_list vargs);
int asprintf(char **ptr, const char *fmt, ...)
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.16 2008/12/12 20:53:02 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.17 2009/02/03 20:27:51 christos Exp $")
#endif
#include <assert.h>
-#include <stdio.h>
#ifdef CDF_DEBUG
#include <err.h>
#endif
#include <stdlib.h>
#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
#ifndef EFTYPE
#define EFTYPE EINVAL
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf_time.c,v 1.4 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: cdf_time.c,v 1.5 2009/02/03 20:27:51 christos Exp $")
#endif
-#include <sys/types.h>
-#include <stdio.h>
#include <time.h>
#ifdef TEST
#include <err.h>
#endif
#include <string.h>
-#include <errno.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
#include "cdf.h"
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: compress.c,v 1.60 2008/11/27 22:16:54 christos Exp $")
+FILE_RCSID("@(#)$File: compress.c,v 1.61 2009/02/03 20:27:51 christos Exp $")
#endif
#include "magic.h"
-#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <string.h>
#include <errno.h>
-#include <sys/types.h>
#include <sys/ioctl.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
*/
#include "file.h"
+
+#ifndef lint
+FILE_RCSID("@(#)$File: encoding.c,v 1.3 2009/02/03 20:27:51 christos Exp $")
+#endif /* lint */
+
#include "magic.h"
#include <string.h>
#include <memory.h>
#include <stdlib.h>
-#ifndef lint
-FILE_RCSID("@(#)$File: encoding.c,v 1.2 2008/11/06 22:49:08 rrt Exp $")
-#endif /* lint */
private int looks_ascii(const unsigned char *, size_t, unichar *, size_t *);
private int looks_utf8_with_BOM(const unsigned char *, size_t, unichar *,
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: file.c,v 1.129 2008/12/03 18:05:18 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.130 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <sys/types.h>
-#include <sys/param.h> /* for MAXPATHLEN */
-#include <sys/stat.h>
#ifdef RESTORE_TIME
# if (__COHERENT__ >= 0x420)
# include <sys/utime.h>
*/
/*
* file.h - definitions for file(1) program
- * @(#)$File: file.h,v 1.117 2008/11/22 17:01:28 chl Exp $
+ * @(#)$File: file.h,v 1.118 2009/02/03 20:27:51 christos Exp $
*/
#ifndef __file_h__
#endif
#include <regex.h>
#include <sys/types.h>
+#include <sys/param.h>
/* Do this here and now, because struct stat gets re-defined on solaris */
#include <sys/stat.h>
#include <stdarg.h>
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: fsmagic.c,v 1.58 2008/11/22 17:01:28 chl Exp $")
+FILE_RCSID("@(#)$File: fsmagic.c,v 1.59 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
#include <unistd.h>
#endif
#include <stdlib.h>
-#include <sys/stat.h>
/* Since major is a function on SVR4, we cannot use `ifndef major'. */
#ifdef MAJOR_IN_MKDEV
# include <sys/mkdev.h>
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: getopt_long.c,v 1.4 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: getopt_long.c,v 1.5 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include <assert.h>
#ifdef HAVE_ERR_H
#include <err.h>
#else
-#include <stdio.h>
#define warnx printf
#endif
#include <errno.h>
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: is_tar.c,v 1.35 2008/11/07 18:57:28 christos Exp $")
+FILE_RCSID("@(#)$File: is_tar.c,v 1.36 2009/02/03 20:27:51 christos Exp $")
#endif
#include "magic.h"
#include <string.h>
#include <ctype.h>
-#include <sys/types.h>
#include "tar.h"
#define isodigit(c) ( ((c) >= '0') && ((c) <= '7') )
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: magic.c,v 1.58 2009/01/12 20:15:11 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.59 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
#include "magic.h"
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include <sys/types.h>
-#include <sys/param.h> /* for MAXPATHLEN */
-#include <sys/stat.h>
#ifdef QUICK
#include <sys/mman.h>
#endif
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: print.c,v 1.65 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: print.c,v 1.66 2009/02/03 20:27:51 christos Exp $")
#endif /* lint */
-#include <stdio.h>
-#include <errno.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readcdf.c,v 1.10 2008/12/03 22:54:02 christos Exp $")
+FILE_RCSID("@(#)$File: readcdf.c,v 1.11 2009/02/03 20:27:51 christos Exp $")
#endif
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: vasprintf.c,v 1.6 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: vasprintf.c,v 1.7 2009/02/03 20:27:52 christos Exp $")
#endif /* lint */
#include <assert.h>
-#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>