diff options
author | obrien <obrien@FreeBSD.org> | 2002-09-16 05:54:26 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-09-16 05:54:26 +0000 |
commit | 2ef757c3c642f5ce8353e106c1fbbd3cea2b14c1 (patch) | |
tree | be5585d7b830cb36fbe379de5dc133810141410c /contrib/file/is_tar.c | |
parent | 7860fd7670d66336ca32454f171db9c04eb45f02 (diff) | |
download | FreeBSD-src-2ef757c3c642f5ce8353e106c1fbbd3cea2b14c1.zip FreeBSD-src-2ef757c3c642f5ce8353e106c1fbbd3cea2b14c1.tar.gz |
Virgin import of Christos Zoulas's FILE 3.39.
Diffstat (limited to 'contrib/file/is_tar.c')
-rw-r--r-- | contrib/file/is_tar.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/file/is_tar.c b/contrib/file/is_tar.c index 6c5b61c..de7a169 100644 --- a/contrib/file/is_tar.c +++ b/contrib/file/is_tar.c @@ -5,25 +5,25 @@ * Public 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.13 2000/08/05 17:36:48 christos Exp $ + * $Id: is_tar.c,v 1.17 2002/07/03 18:26:38 christos Exp $ * * Comments changed and some code/comments reformatted * for file command by Ian Darwin. */ +#include "file.h" #include <string.h> #include <ctype.h> #include <sys/types.h> #include "tar.h" -#include "file.h" #ifndef lint -FILE_RCSID("@(#)$Id: is_tar.c,v 1.13 2000/08/05 17:36:48 christos Exp $") +FILE_RCSID("@(#)$Id: is_tar.c,v 1.17 2002/07/03 18:26:38 christos Exp $") #endif #define isodigit(c) ( ((c) >= '0') && ((c) <= '7') ) -static int from_oct __P((int, char *)); /* Decode octal number */ +static int from_oct(int, char *); /* Decode octal number */ /* * Return @@ -32,9 +32,7 @@ static int from_oct __P((int, char *)); /* Decode octal number */ * 2 for Unix Std (POSIX) tar file. */ int -is_tar(buf, nbytes) - unsigned char *buf; - int nbytes; +is_tar(unsigned char *buf, int nbytes) { union record *header = (union record *)buf; int i; @@ -77,9 +75,7 @@ is_tar(buf, nbytes) * Result is -1 if the field is invalid (all blank, or nonoctal). */ static int -from_oct(digs, where) - int digs; - char *where; +from_oct(int digs, char *where) { int value; |