Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/file resolve conflicts



details:   https://anonhg.NetBSD.org/src/rev/e9094953a5d1
branches:  trunk
changeset: 499575:e9094953a5d1
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Nov 23 23:21:14 2000 +0000

description:
resolve conflicts

diffstat:

 usr.bin/file/ascmagic.c        |    6 +-
 usr.bin/file/config.h          |    3 +-
 usr.bin/file/file.1            |  104 +++++++++++-----------------------------
 usr.bin/file/file.c            |   16 +++---
 usr.bin/file/file.h            |    7 +-
 usr.bin/file/magdir/audio      |   24 ++++++++-
 usr.bin/file/magdir/elf        |    2 +-
 usr.bin/file/magdir/images     |   24 +++++++--
 usr.bin/file/magdir/msdos      |   49 +++++++++++++++++-
 usr.bin/file/magdir/sgi        |   11 ++-
 usr.bin/file/magdir/varied.out |    3 +
 usr.bin/file/magic.5           |    4 +-
 usr.bin/file/patchlevel.h      |   20 ++++++-
 usr.bin/file/readelf.c         |    6 +-
 14 files changed, 161 insertions(+), 118 deletions(-)

diffs (truncated from 532 to 300 lines):

diff -r a5bf83fa4a03 -r e9094953a5d1 usr.bin/file/ascmagic.c
--- a/usr.bin/file/ascmagic.c   Thu Nov 23 23:09:57 2000 +0000
+++ b/usr.bin/file/ascmagic.c   Thu Nov 23 23:21:14 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ascmagic.c,v 1.15 2000/09/22 16:34:59 pooka Exp $      */
+/*     $NetBSD: ascmagic.c,v 1.16 2000/11/23 23:21:14 pooka Exp $      */
 
 /*
  * ASCII magic -- file types that we know based on keywords
@@ -50,9 +50,9 @@
 #include <sys/cdefs.h>
 #ifndef        lint
 #if 0
-FILE_RCSID("@(#)Id: ascmagic.c,v 1.27 2000/04/23 04:28:19 christos Exp ")
+FILE_RCSID("@(#)Id: ascmagic.c,v 1.29 2000/08/05 19:00:11 christos Exp ")
 #else
-__RCSID("$NetBSD: ascmagic.c,v 1.15 2000/09/22 16:34:59 pooka Exp $");
+__RCSID("$NetBSD: ascmagic.c,v 1.16 2000/11/23 23:21:14 pooka Exp $");
 #endif
 #endif /* lint */
 
diff -r a5bf83fa4a03 -r e9094953a5d1 usr.bin/file/config.h
--- a/usr.bin/file/config.h     Thu Nov 23 23:09:57 2000 +0000
+++ b/usr.bin/file/config.h     Thu Nov 23 23:21:14 2000 +0000
@@ -75,5 +75,4 @@
 #define PACKAGE "file"
 
 /* Version number of package */
-#define VERSION "3.32"
-
+#define VERSION "3.33"
diff -r a5bf83fa4a03 -r e9094953a5d1 usr.bin/file/file.1
--- a/usr.bin/file/file.1       Thu Nov 23 23:09:57 2000 +0000
+++ b/usr.bin/file/file.1       Thu Nov 23 23:21:14 2000 +0000
@@ -1,7 +1,7 @@
-.\" $NetBSD: file.1,v 1.17 2000/09/22 16:34:59 pooka Exp $
+.\" $NetBSD: file.1,v 1.18 2000/11/23 23:21:15 pooka Exp $
 .\"
-.TH FILE __CSECTION__ "Copyright but distributable"
-.\" Id: file.man,v 1.36 2000/08/05 17:36:48 christos Exp 
+.TH FILE 1 "Copyright but distributable"
+.\" Id: file.man,v 1.37 2000/08/07 20:08:55 christos Exp 
 .SH NAME
 file
 \- determine file type
@@ -18,7 +18,7 @@
 magicfiles ]
 file ...
 .SH DESCRIPTION
-This manual page documents version 3.26 of the
+This manual page documents version 3.33 of the
 .B file
 command.
 .PP
@@ -53,6 +53,12 @@
 have the word ``text'' printed.
 Don't do as Berkeley did and change ``shell commands text''
 to ``shell script''.
+Note that the file
+.I /usr/share/misc/magic
+is built mechanically from a large number of small files in
+the subdirectory
+.I Magdir
+in the source distribution of this program.
 .PP
 The filesystem tests are based on examining the return from a
 .BR stat (2)
@@ -157,7 +163,7 @@
 ``text/plain; charset=us-ascii''
 rather
 than ``ASCII text''. In order for this option to work, file changes the way
-it handles files recognised by the command it's self (such as many of the
+it handles files recognised by the command itself (such as many of the
 text file types, directories etc), and makes use of an alternative
 ``magic'' file.
 (See ``FILES'' section, below).
@@ -170,8 +176,8 @@
 This can be a single file, or a colon-separated list of files.
 .TP 8
 .B \-n
-Force stdout to be flushed after check a file. This is only useful if
-checking a list of files. It is intended to be used by programs want
+Force stdout to be flushed after checking each file. This is only useful if
+checking a list of files. It is intended to be used by programs that want
 filetype output from a pipe.
 .TP 8
 .B \-v
@@ -209,7 +215,7 @@
 .I /usr/share/misc/magic
 \- default list of magic numbers
 .PP
-.I __MAGIC__.mime
+.I /usr/share/misc/magic.mime
 \- default list of magic numbers, used to output mime types when the -i option
 is specified.
 
@@ -315,42 +321,19 @@
 This slowed the program down slightly but made it a lot more flexible.
 .PP
 This program, based on the System V version,
-was written by Ian Darwin without looking at anybody else's source code.
+was written by Ian Darwin <ian%darwinsys.com@localhost>
+without looking at anybody else's source code.
 .PP
 John Gilmore revised the code extensively, making it better than
 the first version.
 Geoff Collyer found several inadequacies
 and provided some magic file entries.
-The program has undergone continued evolution since.
-.SH AUTHOR
-Written by Ian F. Darwin, UUCP address {utzoo | ihnp4}!darwin!ian,
-Internet address ian%sq.com@localhost,
-postal address: P.O. Box 603, Station F, Toronto, Ontario, CANADA M4Y 2L8.
-.PP
-Altered by Rob McMahon, cudcv%warwick.ac.uk@localhost, 1989, to extend the `&' operator
-from simple `x&y != 0' to `x&y op z'.
-.PP
-Altered by Guy Harris, guy%netapp.com@localhost, 1993, to:
-.RS
+Contributions by the `&' operator by Rob McMahon, cudcv%warwick.ac.uk@localhost, 1989.
 .PP
-put the ``old-style'' `&'
-operator back the way it was, because 1) Rob McMahon's change broke the
-previous style of usage, 2) the SunOS ``new-style'' `&' operator,
-which this version of
-.B file
-supports, also handles `x&y op z', and 3) Rob's change wasn't documented
-in any case;
+Guy Harris, guy%netapp.com@localhost, made many changes from 1993 to the present.
 .PP
-put in multiple levels of `>';
-.PP
-put in ``beshort'', ``leshort'', etc. keywords to look at numbers in the
-file in a specific byte order, rather than in the native byte order of
-the process running
-.BR file .
-.RE
-.PP
-Changes by Ian Darwin and various authors including
-Christos Zoulas (christos%astron.com@localhost), 1990-1999.
+Primary development and maintenance from 1990 to the present by
+Christos Zoulas (christos%astron.com@localhost).
 .PP
 Altered by Chris Lowth, chris%lowth.com@localhost, 2000:
 Handle the ``-i'' option to output mime type strings and using an alternative
@@ -359,45 +342,14 @@
 Altered by Eric Fischer (enf%pobox.com@localhost), July, 2000,
 to identify character codes and attempt to identify the languages
 of non-ASCII files.
+.PP
+The list of contributors to the "Magdir" directory (source for the
+/etc/magic
+file) is too long to include here. You know who you are; thank you.
 .SH LEGAL NOTICE
-Copyright (c) Ian F. Darwin, Toronto, Canada,
-1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993.
-.PP
-This software is not subject to and may not be made subject to any
-license of the American Telephone and Telegraph Company, Sun
-Microsystems Inc., Digital Equipment Inc., Lotus Development Inc., the
-Regents of the University of California, The X Consortium or MIT, or
-The Free Software Foundation.
-.PP
-This software is not subject to any export provision of the United States
-Department of Commerce, and may be exported to any country or planet.
-.PP
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it freely, subject
-to the following restrictions:
-.PP 
-1. The author is not responsible for the consequences of use of this
-software, no matter how awful, even if they arise from flaws in it.
-.PP
-2. The origin of this software must not be misrepresented, either by
-explicit claim or by omission.  Since few users ever read sources,
-credits must appear in the documentation.
-.PP
-3. Altered versions must be plainly marked as such, and must not be
-misrepresented as being the original software.  Since few users
-ever read sources, credits must appear in the documentation.
-.PP
-4. This notice may not be removed or altered.
-.\" .PP
-.\" A few support files (\fIgetopt\fP, \fIstrtok\fP)
-.\" distributed with this package
-.\" are by Henry Spencer and are subject to the same terms as above.
-.\" .PP
-.\" A few simple support files (\fIstrtol\fP, \fIstrchr\fP)
-.\" distributed with this package
-.\" are in the public domain; they are so marked.
-.\"
-.\" enf: commented out because these support files don't seem to be included
+Copyright (c) Ian F. Darwin, Toronto, Canada, 1986-1999.
+Covered by the standard Berkeley Software Distribution copyright; see the file
+LEGAL.NOTICE in the source distribution.
 .PP
 The files
 .I tar.h
@@ -405,7 +357,7 @@
 .I is_tar.c
 were written by John Gilmore from his public-domain
 .B tar
-program, and are not covered by the above restrictions.
+program, and are not covered by the above license.
 .SH BUGS
 There must be a better way to automate the construction of the Magic
 file from all the glop in Magdir. What is it?
diff -r a5bf83fa4a03 -r e9094953a5d1 usr.bin/file/file.c
--- a/usr.bin/file/file.c       Thu Nov 23 23:09:57 2000 +0000
+++ b/usr.bin/file/file.c       Thu Nov 23 23:21:14 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: file.c,v 1.18 2000/10/04 20:09:04 mjl Exp $    */
+/*     $NetBSD: file.c,v 1.19 2000/11/23 23:21:15 pooka Exp $  */
 
 /*
  * file - find type of a file or files - main program.
@@ -26,14 +26,13 @@
  *
  * 4. This notice may not be removed or altered.
  */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/param.h> /* for MAXPATHLEN */
 #include <sys/stat.h>
-
-#include "file.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <fcntl.h>     /* for open() */
 #ifdef RESTORE_TIME
 # if (__COHERENT__ >= 0x420)
@@ -55,13 +54,14 @@
 
 #include <netinet/in.h>                /* for byte swapping */
 
+#include "file.h"
 #include "patchlevel.h"
 
 #ifndef        lint
 #if 0
-FILE_RCSID("@(#)Id: file.c,v 1.51 2000/05/14 17:58:36 christos Exp ")
+FILE_RCSID("@(#)Id: file.c,v 1.55 2000/08/05 19:00:12 christos Exp ")
 #else
-__RCSID("$NetBSD: file.c,v 1.18 2000/10/04 20:09:04 mjl Exp $");
+__RCSID("$NetBSD: file.c,v 1.19 2000/11/23 23:21:15 pooka Exp $");
 #endif
 #endif /* lint */
 
diff -r a5bf83fa4a03 -r e9094953a5d1 usr.bin/file/file.h
--- a/usr.bin/file/file.h       Thu Nov 23 23:09:57 2000 +0000
+++ b/usr.bin/file/file.h       Thu Nov 23 23:21:14 2000 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: file.h,v 1.20 2000/09/22 16:34:59 pooka Exp $  */
+/*     $NetBSD: file.h,v 1.21 2000/11/23 23:21:15 pooka Exp $  */
 
 /*
  * file.h - definitions for file(1) program
- * @(#)Id: file.h,v 1.32 2000/05/14 22:58:53 christos Exp 
+ * @(#)Id: file.h,v 1.34 2000/11/13 00:30:49 christos Exp 
  *
  * Copyright (c) Ian F. Darwin, 1987.
  * Written by Ian F. Darwin.
@@ -123,7 +123,6 @@
 extern int   zmagic            __P((unsigned char *, int));
 extern void  ckfprintf         __P((FILE *, const char *, ...));
 extern uint32 signextend       __P((struct magic *, unsigned int32));
-extern int internatmagic       __P((unsigned char *, int));
 extern void tryelf             __P((int, unsigned char *, int));
 
 extern char *progname;         /* the program name                     */
@@ -160,7 +159,7 @@
        return rcsid(p = id); \
 }
 #else
-#define FILE_RCSID(id) static char *rcsid[] = id;
+#define FILE_RCSID(id) static char rcsid[] = id;
 #endif
 
 #endif /* __file_h__ */
diff -r a5bf83fa4a03 -r e9094953a5d1 usr.bin/file/magdir/audio
--- a/usr.bin/file/magdir/audio Thu Nov 23 23:09:57 2000 +0000
+++ b/usr.bin/file/magdir/audio Thu Nov 23 23:21:14 2000 +0000
@@ -102,8 +102,9 @@
 1080   string  8CHN            8-channel Fasttracker module sound data
 1080   string  CD81            8-channel Oktalyzer module sound data
 1080   string  OKTA            8-channel Oktalyzer module sound data
-1082   string  CH
->1080  string  >/0             %.2s-channel Fasttracker "oktalyzer" module sound data
+# Not good enough.
+#1082  string  CH
+#>1080 string  >/0             %.2s-channel Fasttracker "oktalyzer" module sound data
 1080   string  16CN            16-channel Taketracker module sound data
 1080   string  32CN            32-channel Taketracker module sound data
 
@@ -118,3 +119,22 @@
 >14    beshort         =1                      single song,



Home | Main Index | Thread Index | Old Index