Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/file fix nested extern and duplicate decls



details:   https://anonhg.NetBSD.org/src/rev/fadb9434268c
branches:  trunk
changeset: 503375:fadb9434268c
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 05 01:51:52 2001 +0000

description:
fix nested extern and duplicate decls

diffstat:

 usr.bin/file/file.h      |  4 +++-
 usr.bin/file/softmagic.c |  7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r 8515f5e635ee -r fadb9434268c usr.bin/file/file.h
--- a/usr.bin/file/file.h       Mon Feb 05 01:47:01 2001 +0000
+++ b/usr.bin/file/file.h       Mon Feb 05 01:51:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: file.h,v 1.21 2000/11/23 23:21:15 pooka Exp $  */
+/*     $NetBSD: file.h,v 1.22 2001/02/05 01:51:52 christos Exp $       */
 
 /*
  * file.h - definitions for file(1) program
@@ -139,8 +139,10 @@
 extern int sflag;              /* read/analyze block special files?    */
 extern int iflag;              /* Output types as mime-types           */
 
+#ifdef NEED_GETOPT
 extern int optind;             /* From getopt(3)                       */
 extern char *optarg;
+#endif
 
 #ifndef HAVE_STRERROR
 extern int sys_nerr;
diff -r 8515f5e635ee -r fadb9434268c usr.bin/file/softmagic.c
--- a/usr.bin/file/softmagic.c  Mon Feb 05 01:47:01 2001 +0000
+++ b/usr.bin/file/softmagic.c  Mon Feb 05 01:51:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: softmagic.c,v 1.19 2000/09/22 16:35:00 pooka Exp $     */
+/*     $NetBSD: softmagic.c,v 1.20 2001/02/05 01:51:52 christos Exp $  */
 
 /*
  * softmagic - interpret variable magic from MAGIC
@@ -41,7 +41,7 @@
 #if 0
 FILE_RCSID("@(#)Id: softmagic.c,v 1.41 2000/05/14 17:58:36 christos Exp ")
 #else
-__RCSID("$NetBSD: softmagic.c,v 1.19 2000/09/22 16:35:00 pooka Exp $");
+__RCSID("$NetBSD: softmagic.c,v 1.20 2001/02/05 01:51:52 christos Exp $");
 #endif
 #endif /* lint */
 
@@ -53,6 +53,8 @@
 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 MAGIC by apprentice.c).
@@ -110,7 +112,6 @@
        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 */
 
        if (tmpoff == NULL)



Home | Main Index | Thread Index | Old Index