Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/file minor shuffles to make this more like the vendo...



details:   https://anonhg.NetBSD.org/src/rev/f83032d767e2
branches:  trunk
changeset: 533892:f83032d767e2
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jul 10 16:15:52 2002 +0000

description:
minor shuffles to make this more like the vendor version

diffstat:

 usr.bin/file/apprentice.c |  7 ++-----
 usr.bin/file/ascmagic.c   |  7 ++-----
 usr.bin/file/compress.c   |  6 ++----
 usr.bin/file/file.1       |  4 ++--
 usr.bin/file/file.h       |  4 +---
 usr.bin/file/is_tar.c     |  5 ++---
 usr.bin/file/print.c      |  9 +++------
 7 files changed, 14 insertions(+), 28 deletions(-)

diffs (175 lines):

diff -r 82bc3c94dbda -r f83032d767e2 usr.bin/file/apprentice.c
--- a/usr.bin/file/apprentice.c Wed Jul 10 15:55:01 2002 +0000
+++ b/usr.bin/file/apprentice.c Wed Jul 10 16:15:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apprentice.c,v 1.32 2002/07/09 14:59:52 pooka Exp $    */
+/*     $NetBSD: apprentice.c,v 1.33 2002/07/10 16:15:52 pooka Exp $    */
 
 /*
  * apprentice - make one pass through /etc/magic, learning its secrets.
@@ -35,9 +35,6 @@
 #include <string.h>
 #include <ctype.h>
 #include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 #ifdef QUICK
 #include <sys/mman.h>
 #endif
@@ -47,7 +44,7 @@
 #if 0
 FILE_RCSID("@(#)Id: apprentice.c,v 1.49 2002/07/03 19:00:41 christos Exp ")
 #else
-__RCSID("$NetBSD: apprentice.c,v 1.32 2002/07/09 14:59:52 pooka Exp $");
+__RCSID("$NetBSD: apprentice.c,v 1.33 2002/07/10 16:15:52 pooka Exp $");
 #endif
 #endif /* lint */
 
diff -r 82bc3c94dbda -r f83032d767e2 usr.bin/file/ascmagic.c
--- a/usr.bin/file/ascmagic.c   Wed Jul 10 15:55:01 2002 +0000
+++ b/usr.bin/file/ascmagic.c   Wed Jul 10 16:15:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ascmagic.c,v 1.19 2002/07/09 14:59:53 pooka Exp $      */
+/*     $NetBSD: ascmagic.c,v 1.20 2002/07/10 16:15:53 pooka Exp $      */
 
 /*
  * ASCII magic -- file types that we know based on keywords
@@ -51,13 +51,10 @@
 #if 0
 FILE_RCSID("@(#)Id: ascmagic.c,v 1.32 2002/07/03 18:26:37 christos Exp ")
 #else
-__RCSID("$NetBSD: ascmagic.c,v 1.19 2002/07/09 14:59:53 pooka Exp $");
+__RCSID("$NetBSD: ascmagic.c,v 1.20 2002/07/10 16:15:53 pooka Exp $");
 #endif
 #endif /* lint */
 
-                       /* an optimisation over plain strcmp() */
-#define        STREQ(a, b)     (*(a) == *(b) && strcmp((a), (b)) == 0)
-
 typedef unsigned long unichar;
 
 #define MAXLINELEN 300 /* longest sane line length */
diff -r 82bc3c94dbda -r f83032d767e2 usr.bin/file/compress.c
--- a/usr.bin/file/compress.c   Wed Jul 10 15:55:01 2002 +0000
+++ b/usr.bin/file/compress.c   Wed Jul 10 16:15:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compress.c,v 1.13 2002/07/09 14:59:53 pooka Exp $      */
+/*     $NetBSD: compress.c,v 1.14 2002/07/10 16:15:53 pooka Exp $      */
 
 /*
  * compress routines:
@@ -8,8 +8,6 @@
  *                                         using method, return sizeof new
  */
 #include "file.h"
-#include <fcntl.h>
-#include <stdio.h>
 #include <stdlib.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -27,7 +25,7 @@
 #if 0
 FILE_RCSID("@(#)Id: compress.c,v 1.25 2002/07/03 18:26:37 christos Exp ")
 #else
-__RCSID("$NetBSD: compress.c,v 1.13 2002/07/09 14:59:53 pooka Exp $");
+__RCSID("$NetBSD: compress.c,v 1.14 2002/07/10 16:15:53 pooka Exp $");
 #endif
 #endif
 
diff -r 82bc3c94dbda -r f83032d767e2 usr.bin/file/file.1
--- a/usr.bin/file/file.1       Wed Jul 10 15:55:01 2002 +0000
+++ b/usr.bin/file/file.1       Wed Jul 10 16:15:52 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: file.1,v 1.27 2002/07/09 14:59:53 pooka Exp $
+.\" $NetBSD: file.1,v 1.28 2002/07/10 16:15:53 pooka Exp $
 .\"
 .TH FILE 1 "Copyright but distributable"
 .\" Id: file.man,v 1.42 2002/07/03 18:26:37 christos Exp 
@@ -79,7 +79,7 @@
 implement them)
 are intuited if they are defined in
 the system header file
-.IR \*[Lt]sys/stat.h\*[Gt]  .
+.IR \*[Lt]sys/stat.h\*[Gt] .
 .PP
 The magic number tests are used to check for files with data in
 particular fixed formats.
diff -r 82bc3c94dbda -r f83032d767e2 usr.bin/file/file.h
--- a/usr.bin/file/file.h       Wed Jul 10 15:55:01 2002 +0000
+++ b/usr.bin/file/file.h       Wed Jul 10 16:15:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: file.h,v 1.28 2002/07/09 14:59:54 pooka Exp $  */
+/*     $NetBSD: file.h,v 1.29 2002/07/10 16:15:54 pooka Exp $  */
 
 /*
  * file.h - definitions for file(1) program
@@ -31,8 +31,6 @@
 #ifndef __file_h__
 #define __file_h__
 
-#include <inttypes.h>
-
 #ifndef __linux__
 #define _LARGEFILE_SOURCE
 #define _LARGEFILE64_SOURCE 
diff -r 82bc3c94dbda -r f83032d767e2 usr.bin/file/is_tar.c
--- a/usr.bin/file/is_tar.c     Wed Jul 10 15:55:01 2002 +0000
+++ b/usr.bin/file/is_tar.c     Wed Jul 10 16:15:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: is_tar.c,v 1.15 2002/07/09 14:59:54 pooka Exp $        */
+/*     $NetBSD: is_tar.c,v 1.16 2002/07/10 16:15:54 pooka Exp $        */
 
 /*
  * is_tar() -- figure out whether file is a tar archive.
@@ -17,7 +17,6 @@
 #include <string.h>
 #include <ctype.h>
 #include <sys/types.h>
-#include "file.h"
 #include "tar.h"
 
 #include <sys/cdefs.h>
@@ -25,7 +24,7 @@
 #if 0
 FILE_RCSID("@(#)Id: is_tar.c,v 1.17 2002/07/03 18:26:38 christos Exp ")
 #else
-__RCSID("$NetBSD: is_tar.c,v 1.15 2002/07/09 14:59:54 pooka Exp $");
+__RCSID("$NetBSD: is_tar.c,v 1.16 2002/07/10 16:15:54 pooka Exp $");
 #endif
 #endif
 
diff -r 82bc3c94dbda -r f83032d767e2 usr.bin/file/print.c
--- a/usr.bin/file/print.c      Wed Jul 10 15:55:01 2002 +0000
+++ b/usr.bin/file/print.c      Wed Jul 10 16:15:52 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print.c,v 1.26 2002/07/09 14:59:54 pooka Exp $ */
+/*     $NetBSD: print.c,v 1.27 2002/07/10 16:15:54 pooka Exp $ */
 
 /*
  * print.c - debugging printout routines
@@ -28,22 +28,19 @@
  */
 
 #include "file.h"
-#include <errno.h>
 #include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
-#include <time.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#include <time.h>
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
 #if 0
 FILE_RCSID("@(#)Id: print.c,v 1.38 2002/07/03 18:37:44 christos Exp ")
 #else
-__RCSID("$NetBSD: print.c,v 1.26 2002/07/09 14:59:54 pooka Exp $");
+__RCSID("$NetBSD: print.c,v 1.27 2002/07/10 16:15:54 pooka Exp $");
 #endif
 #endif  /* lint */
 



Home | Main Index | Thread Index | Old Index