summaryrefslogtreecommitdiff
path: root/usr.bin/file
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/file')
-rw-r--r--usr.bin/file/apprentice.c16
-rw-r--r--usr.bin/file/compress.c4
-rw-r--r--usr.bin/file/file.c10
-rw-r--r--usr.bin/file/file.h34
-rw-r--r--usr.bin/file/softmagic.c14
5 files changed, 39 insertions, 39 deletions
diff --git a/usr.bin/file/apprentice.c b/usr.bin/file/apprentice.c
index 29fa9781d7a..c6bc2814c6a 100644
--- a/usr.bin/file/apprentice.c
+++ b/usr.bin/file/apprentice.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apprentice.c,v 1.11 2001/11/19 19:02:13 mpech Exp $ */
+/* $OpenBSD: apprentice.c,v 1.12 2002/02/16 21:27:46 millert Exp $ */
/*
* apprentice - make one pass through /etc/magic, learning its secrets.
@@ -36,7 +36,7 @@
#include "file.h"
#ifndef lint
-static char *moduleid = "$OpenBSD: apprentice.c,v 1.11 2001/11/19 19:02:13 mpech Exp $";
+static char *moduleid = "$OpenBSD: apprentice.c,v 1.12 2002/02/16 21:27:46 millert Exp $";
#endif /* lint */
#define EATAB {while (isascii((unsigned char) *l) && \
@@ -45,16 +45,16 @@ static char *moduleid = "$OpenBSD: apprentice.c,v 1.11 2001/11/19 19:02:13 mpech
tolower((unsigned char) (l)) : (l))
-static int getvalue __P((struct magic *, char **));
-static int hextoint __P((int));
-static char *getstr __P((char *, char *, int, int *));
-static int parse __P((char *, int *, int));
-static void eatsize __P((char **));
+static int getvalue(struct magic *, char **);
+static int hextoint(int);
+static char *getstr(char *, char *, int, int *);
+static int parse(char *, int *, int);
+static void eatsize(char **);
static int maxmagic = 0;
static int alloc_incr = 256;
-static int apprentice_1 __P((char *, int));
+static int apprentice_1(char *, int);
int
apprentice(fn, check)
diff --git a/usr.bin/file/compress.c b/usr.bin/file/compress.c
index 7c6ef4d42a2..081cf713c51 100644
--- a/usr.bin/file/compress.c
+++ b/usr.bin/file/compress.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compress.c,v 1.4 1998/07/10 15:05:19 mickey Exp $ */
+/* $OpenBSD: compress.c,v 1.5 2002/02/16 21:27:46 millert Exp $ */
/*
* compress routines:
@@ -33,7 +33,7 @@ static struct {
static int ncompr = sizeof(compr) / sizeof(compr[0]);
-static int uncompress __P((int, const unsigned char *, unsigned char **, int));
+static int uncompress(int, const unsigned char *, unsigned char **, int);
int
zmagic(buf, nbytes)
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c
index 7b60497b186..a7ec04264e2 100644
--- a/usr.bin/file/file.c
+++ b/usr.bin/file/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.7 1999/02/19 00:28:37 deraadt Exp $ */
+/* $OpenBSD: file.c,v 1.8 2002/02/16 21:27:46 millert Exp $ */
/*
* file - find type of a file or files - main program.
@@ -27,7 +27,7 @@
* 4. This notice may not be removed or altered.
*/
#ifndef lint
-static char *moduleid = "$OpenBSD: file.c,v 1.7 1999/02/19 00:28:37 deraadt Exp $";
+static char *moduleid = "$OpenBSD: file.c,v 1.8 2002/02/16 21:27:46 millert Exp $";
#endif /* lint */
#include <stdio.h>
@@ -79,10 +79,10 @@ char *magicfile; /* where magic be found */
int lineno; /* line number in the magic file */
-static void unwrap __P((char *fn));
+static void unwrap(char *fn);
#if 0
-static int byteconv4 __P((int, int, int));
-static short byteconv2 __P((int, int, int));
+static int byteconv4(int, int, int);
+static short byteconv2(int, int, int);
#endif
/*
diff --git a/usr.bin/file/file.h b/usr.bin/file/file.h
index 8db21741a18..d5da9a614cb 100644
--- a/usr.bin/file/file.h
+++ b/usr.bin/file/file.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.h,v 1.7 1999/09/26 20:47:28 ian Exp $ */
+/* $OpenBSD: file.h,v 1.8 2002/02/16 21:27:46 millert Exp $ */
/*
* file.h - definitions for file(1) program
@@ -90,23 +90,23 @@ struct magic {
# endif
#endif
-extern int apprentice __P((char *, int));
-extern int ascmagic __P((unsigned char *, int));
-extern void ckfputs __P((const char *, FILE *));
+extern int apprentice(char *, int);
+extern int ascmagic(unsigned char *, int);
+extern void ckfputs(const char *, FILE *);
struct stat;
-extern int fsmagic __P((const char *, struct stat *));
-extern int is_compress __P((const unsigned char *, int *));
-extern int is_tar __P((unsigned char *, int));
-extern void mdump __P((struct magic *));
-extern void process __P((const char *, int));
-extern void showstr __P((FILE *, const char *, int));
-extern int softmagic __P((unsigned char *, int));
-extern int tryit __P((unsigned char *, int, int));
-extern int zmagic __P((unsigned char *, int));
-extern void ckfprintf __P((FILE *, const char *, ...));
-extern uint32 signextend __P((struct magic *, unsigned int32));
-extern int internatmagic __P((unsigned char *, int));
-extern void tryelf __P((int, char *, int));
+extern int fsmagic(const char *, struct stat *);
+extern int is_compress(const unsigned char *, int *);
+extern int is_tar(unsigned char *, int);
+extern void mdump(struct magic *);
+extern void process(const char *, int);
+extern void showstr(FILE *, const char *, int);
+extern int softmagic(unsigned char *, int);
+extern int tryit(unsigned char *, int, int);
+extern int zmagic(unsigned char *, int);
+extern void ckfprintf(FILE *, const char *, ...);
+extern uint32 signextend(struct magic *, unsigned int32);
+extern int internatmagic(unsigned char *, int);
+extern void tryelf(int, char *, int);
extern int errno; /* Some unixes don't define this.. */
diff --git a/usr.bin/file/softmagic.c b/usr.bin/file/softmagic.c
index ed222bbd653..0c57a93ba3b 100644
--- a/usr.bin/file/softmagic.c
+++ b/usr.bin/file/softmagic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softmagic.c,v 1.5 2001/11/19 19:02:13 mpech Exp $ */
+/* $OpenBSD: softmagic.c,v 1.6 2002/02/16 21:27:46 millert Exp $ */
/*
* softmagic - interpret variable magic from /etc/magic
@@ -37,16 +37,16 @@
#include "file.h"
#ifndef lint
-static char *moduleid = "$OpenBSD: softmagic.c,v 1.5 2001/11/19 19:02:13 mpech Exp $";
+static char *moduleid = "$OpenBSD: softmagic.c,v 1.6 2002/02/16 21:27:46 millert Exp $";
#endif /* lint */
-static int match __P((unsigned char *, int));
+static int match(unsigned char *, int);
static int mget __P((union VALUETYPE *,
unsigned char *, struct magic *, int));
-static int mcheck __P((union VALUETYPE *, struct magic *));
-static int32 mprint __P((union VALUETYPE *, struct magic *));
-static void mdebug __P((int32, char *, int));
-static int mconvert __P((union VALUETYPE *, struct magic *));
+static int mcheck(union VALUETYPE *, struct magic *);
+static int32 mprint(union VALUETYPE *, struct magic *);
+static void mdebug(int32, char *, int);
+static int mconvert(union VALUETYPE *, struct magic *);
/*
* softmagic - lookup one file in database