From 71dcf18e971c5799c76e53c33d96c1a279936978 Mon Sep 17 00:00:00 2001 From: Ian Darwin Date: Fri, 11 Sep 1987 15:02:25 +0000 Subject: [PATCH] Add updated legal notice. --- src/Makefile | 32 ++++++++++++++++++++++++++------ src/apprentice.c | 25 ++++++++++++++++++++++++- src/ascmagic.c | 26 +++++++++++++++++++++++++- src/file.c | 25 ++++++++++++++++++++++++- src/file.h | 25 ++++++++++++++++++++++++- src/fsmagic.c | 25 ++++++++++++++++++++++++- src/names.h | 23 +++++++++++++++++++++++ src/print.c | 25 ++++++++++++++++++++++++- src/softmagic.c | 28 ++++++++++++++++++++++++++-- 9 files changed, 220 insertions(+), 14 deletions(-) diff --git a/src/Makefile b/src/Makefile index 55b1828f..994103e7 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,11 +1,31 @@ -# Makefile for file(1) cmd. Copyright (c) Darwin 86/09/01 - see LEGAL.NOTICE. +# Makefile for file(1) cmd. +# Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE. +# +# This software is not subject to any license of the American Telephone +# and Telegraph Company or of the Regents of the University of California. +# +# 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: +# +# 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. +# +# 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. +# +# 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. +# +# 4. This notice may not be removed or altered. MAGIC = /etc/magic DEFS = -DMAGIC='"$(MAGIC)"' # -Dvoid=int COPTS = -O # -g CFLAGS = $(COPTS) $(DEFS) SHAR = bundle -OTHERS = darwin!ian # people to whom we mail updates OFILE = /usr/bin/file.orig # old or distributed version, for comparison BINDIR = /usr/local # where new binary lives MANDIR = /usr/man/local # for our man pages @@ -19,8 +39,8 @@ LOCALOBJS = strtol.o strtok.o OBJS = file.o apprentice.o fsmagic.o softmagic.o ascmagic.o is_tar.o \ print.o $(LOCALOBJS) -ALLSRC = LEGAL.NOTICE README PORTING TODO $(SRCS) *.h \ - Makefile file.[15] magdir/[a-z]* tst/Makefile +ALLSRC = LEGAL.NOTICE README PORTING $(SRCS) *.h \ + Makefile file.1 magic.4 magdir/[a-z]* tst/Makefile all: file magic @@ -47,10 +67,10 @@ install: all cp file $(BINDIR)/file cp magic $(MAGIC) cp file.1 $(MANDIR)/man1 - cp file.5 $(MANDIR)/man5 + cp magic.4 $(MANDIR)/man4 # maybe 5 on some systems. clean: - rm -f *.o file magic errs lintout + rm -f *.o file magic lint.out (cd tst; make clean) dist: $(ALLSRC) diff --git a/src/apprentice.c b/src/apprentice.c index 66975b2f..b593da60 100644 --- a/src/apprentice.c +++ b/src/apprentice.c @@ -1,5 +1,28 @@ /* - * make one pass through /etc/magic, reading it into core + * apprentice - make one pass through /etc/magic, learning its secrets. + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ #include diff --git a/src/ascmagic.c b/src/ascmagic.c index f5a83a55..e281742e 100644 --- a/src/ascmagic.c +++ b/src/ascmagic.c @@ -1,14 +1,38 @@ /* * Ascii magic -- file types that we know based on keywords * that can appear anywhere in the file. + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ #include #include #include "file.h" -char ckfmsg[] = "write error on output"; #include "names.h" +char ckfmsg[] = "write error on output"; + /* an optimisation over plain strcmp() */ #define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0) diff --git a/src/file.c b/src/file.c index e080b15f..05b0284b 100644 --- a/src/file.c +++ b/src/file.c @@ -1,5 +1,28 @@ /* - * file - find type of a file or files + * file - find type of a file or files - main program. + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ #include diff --git a/src/file.h b/src/file.h index 1c474633..6de66d55 100644 --- a/src/file.h +++ b/src/file.h @@ -1,5 +1,28 @@ /* - * definitions for file(1) program: + * file.h - definitions for file(1) program + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ #define HOWMANY 1024 /* how much of the file to look at */ diff --git a/src/fsmagic.c b/src/fsmagic.c index ee2454c4..66fb0457 100644 --- a/src/fsmagic.c +++ b/src/fsmagic.c @@ -1,5 +1,28 @@ /* - * magic based on mode of file - directory, special files, etc. + * fsmagic - magic based on filesystem info - directory, special files, etc. + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ #include diff --git a/src/names.h b/src/names.h index 8db588ee..b2190809 100644 --- a/src/names.h +++ b/src/names.h @@ -4,6 +4,29 @@ * the first HOWMANY bytes, while tokens in /etc/magic must * appear at fixed offsets into the file. Don't make HOWMANY * too high unless you have a very fast CPU. + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ /* these types are used to index the table 'types': keep em in sync! */ diff --git a/src/print.c b/src/print.c index b2dc80f6..676b4a2d 100644 --- a/src/print.c +++ b/src/print.c @@ -1,5 +1,28 @@ /* - * Debugging printout routines + * print.c - debugging printout routines + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ #include diff --git a/src/softmagic.c b/src/softmagic.c index f03f4600..0aa757e6 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -1,5 +1,28 @@ /* - * variable magic from /etc/magic + * softmagic - interpret variable magic from /etc/magic + * + * Copyright (c) Ian F. Darwin, 1987. + * Written by Ian F. Darwin. + * + * This software is not subject to any license of the American Telephone + * and Telegraph Company or of the Regents of the University of California. + * + * 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: + * + * 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. + * + * 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. + * + * 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. + * + * 4. This notice may not be removed or altered. */ #include @@ -15,7 +38,8 @@ extern struct magic magic[]; static int magindex; /* - * softmagic - lookup one file in /etc/magic database. + * softmagic - lookup one file in database + * (already read from /etc/magic by apprentice.c). * Passed the name and FILE * of one file to be typed. */ softmagic(buf) -- 2.40.0