summaryrefslogtreecommitdiff
path: root/usr.bin/file/is_tar.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-02-09 23:58:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-02-09 23:58:45 +0000
commitb422126a9f85ea5db78f94af33944c1fc2d7688b (patch)
tree6f36ae5252edf74c47c797bbf26b2d1394c3a7f8 /usr.bin/file/is_tar.c
parentf45ed397f9eaba4002d360a56368c365a1aeabd2 (diff)
Updates file(1) to version 3.22 by way to NetBSD.
Diffstat (limited to 'usr.bin/file/is_tar.c')
-rw-r--r--usr.bin/file/is_tar.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/file/is_tar.c b/usr.bin/file/is_tar.c
index c6ebe06e2a4..ec10f41e9bf 100644
--- a/usr.bin/file/is_tar.c
+++ b/usr.bin/file/is_tar.c
@@ -1,4 +1,5 @@
-/* $OpenBSD: is_tar.c,v 1.2 1996/06/26 05:32:58 deraadt Exp $ */
+/* $OpenBSD: is_tar.c,v 1.3 1997/02/09 23:58:27 millert Exp $ */
+
/*
* is_tar() -- figure out whether file is a tar archive.
*
@@ -19,9 +20,9 @@
#define isodigit(c) ( ((c) >= '0') && ((c) <= '7') )
#if defined(__STDC__) || defined(__cplusplus)
-static long from_oct(int, char*); /* Decode octal number */
+static int from_oct(int, char*); /* Decode octal number */
#else
-static long from_oct();
+static int from_oct();
#endif
/*
@@ -37,7 +38,7 @@ int nbytes;
{
register union record *header = (union record *)buf;
register int i;
- register long sum, recsum;
+ register int sum, recsum;
register char *p;
if (nbytes < sizeof(union record))
@@ -75,12 +76,12 @@ int nbytes;
*
* Result is -1 if the field is invalid (all blank, or nonoctal).
*/
-static long
+static int
from_oct(digs, where)
register int digs;
register char *where;
{
- register long value;
+ register int value;
while (isspace(*where)) { /* Skip spaces */
where++;