summaryrefslogtreecommitdiffstats
path: root/contrib/file/softmagic.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-04-25 07:41:21 +0000
committerobrien <obrien@FreeBSD.org>2001-04-25 07:41:21 +0000
commit30980cd72da9ade33a9b331e58e75660d180a109 (patch)
tree000ebc599c417e0830db5f66711d1e99a3edfdcb /contrib/file/softmagic.c
parentfd87285c4e3e4e4fbf7112229c209a1c6ea64494 (diff)
downloadFreeBSD-src-30980cd72da9ade33a9b331e58e75660d180a109.zip
FreeBSD-src-30980cd72da9ade33a9b331e58e75660d180a109.tar.gz
Virgin import of Christos Zoulas's FILE 3.35.
Diffstat (limited to 'contrib/file/softmagic.c')
-rw-r--r--contrib/file/softmagic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/file/softmagic.c b/contrib/file/softmagic.c
index e954b2e..a32e232 100644
--- a/contrib/file/softmagic.c
+++ b/contrib/file/softmagic.c
@@ -1,5 +1,5 @@
/*
- * softmagic - interpret variable magic from /etc/magic
+ * softmagic - interpret variable magic from MAGIC
*
* Copyright (c) Ian F. Darwin, 1987.
* Written by Ian F. Darwin.
@@ -35,7 +35,7 @@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$Id: softmagic.c,v 1.43 2001/03/11 20:29:16 christos Exp $")
+FILE_RCSID("@(#)$Id: softmagic.c,v 1.44 2001/03/17 19:32:50 christos Exp $")
#endif /* lint */
static int match __P((struct magic *, uint32, unsigned char *, int));
@@ -46,6 +46,8 @@ static int32 mprint __P((union VALUETYPE *, struct magic *));
static void mdebug __P((int32, char *, int));
static int mconvert __P((union VALUETYPE *, struct magic *));
+extern int kflag;
+
/*
* softmagic - lookup one file in database
* (already read from /etc/magic by apprentice.c).
@@ -108,9 +110,7 @@ match(magic, nmagic, s, nbytes)
static size_t tmplen = 0;
int32 oldoff = 0;
int returnval = 0; /* if a match is found it is set to 1*/
- extern int kflag;
int firstline = 1; /* a flag to print X\n X\n- X */
- struct mlist *ml;
if (tmpoff == NULL)
if ((tmpoff = (int32 *) malloc(tmplen = 20)) == NULL)
OpenPOWER on IntegriCloud