diff options
author | Ian Darwin <ian@cvs.openbsd.org> | 2003-03-11 21:26:27 +0000 |
---|---|---|
committer | Ian Darwin <ian@cvs.openbsd.org> | 2003-03-11 21:26:27 +0000 |
commit | 760d2cd88f46201f6ca86e1b26515fc24bbb59f5 (patch) | |
tree | b10195a7a8645d26451d96e3e4116896ffd560ec | |
parent | 36528318ba8324f1c814a54342aa3acc2cf97d9d (diff) |
Replace TPUM license with standard BSD-style license
-rw-r--r-- | usr.bin/file/apprentice.c | 56 | ||||
-rw-r--r-- | usr.bin/file/ascmagic.c | 56 | ||||
-rw-r--r-- | usr.bin/file/compress.c | 34 | ||||
-rw-r--r-- | usr.bin/file/file.1 | 54 | ||||
-rw-r--r-- | usr.bin/file/file.c | 57 | ||||
-rw-r--r-- | usr.bin/file/file.h | 54 | ||||
-rw-r--r-- | usr.bin/file/fsmagic.c | 56 | ||||
-rw-r--r-- | usr.bin/file/internat.c | 35 | ||||
-rw-r--r-- | usr.bin/file/magic.5 | 54 | ||||
-rw-r--r-- | usr.bin/file/names.h | 36 | ||||
-rw-r--r-- | usr.bin/file/patchlevel.h | 131 | ||||
-rw-r--r-- | usr.bin/file/print.c | 56 | ||||
-rw-r--r-- | usr.bin/file/readelf.c | 37 | ||||
-rw-r--r-- | usr.bin/file/readelf.h | 32 | ||||
-rw-r--r-- | usr.bin/file/softmagic.c | 56 |
15 files changed, 483 insertions, 321 deletions
diff --git a/usr.bin/file/apprentice.c b/usr.bin/file/apprentice.c index 7174f117b89..b0595d7f15a 100644 --- a/usr.bin/file/apprentice.c +++ b/usr.bin/file/apprentice.c @@ -1,30 +1,38 @@ -/* $OpenBSD: apprentice.c,v 1.15 2002/08/12 00:42:56 aaron Exp $ */ +/* $OpenBSD: apprentice.c,v 1.16 2003/03/11 21:26:26 ian Exp $ */ /* * 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. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include <stdio.h> @@ -36,7 +44,7 @@ #include "file.h" #ifndef lint -static char *moduleid = "$OpenBSD: apprentice.c,v 1.15 2002/08/12 00:42:56 aaron Exp $"; +static char *moduleid = "$OpenBSD: apprentice.c,v 1.16 2003/03/11 21:26:26 ian Exp $"; #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ diff --git a/usr.bin/file/ascmagic.c b/usr.bin/file/ascmagic.c index 75de0fa045c..f2fe3efa971 100644 --- a/usr.bin/file/ascmagic.c +++ b/usr.bin/file/ascmagic.c @@ -1,31 +1,39 @@ -/* $OpenBSD: ascmagic.c,v 1.5 2001/11/19 19:02:13 mpech Exp $ */ +/* $OpenBSD: ascmagic.c,v 1.6 2003/03/11 21:26:26 ian Exp $ */ /* * 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. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include <stdio.h> @@ -38,7 +46,7 @@ #include "names.h" #ifndef lint -static char *moduleid = "$OpenBSD: ascmagic.c,v 1.5 2001/11/19 19:02:13 mpech Exp $"; +static char *moduleid = "$OpenBSD: ascmagic.c,v 1.6 2003/03/11 21:26:26 ian Exp $"; #endif /* lint */ /* an optimisation over plain strcmp() */ diff --git a/usr.bin/file/compress.c b/usr.bin/file/compress.c index 3d7d1e13266..71a64c15521 100644 --- a/usr.bin/file/compress.c +++ b/usr.bin/file/compress.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compress.c,v 1.6 2003/03/03 22:24:08 ian Exp $ */ +/* $OpenBSD: compress.c,v 1.7 2003/03/11 21:26:26 ian Exp $ */ /* * compress routines: @@ -6,7 +6,39 @@ * information if recognized * uncompress(method, old, n, newch) - uncompress old into new, * using method, return sizeof new + * + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ + #include "file.h" #include <stdlib.h> #ifdef HAVE_UNISTD_H diff --git a/usr.bin/file/file.1 b/usr.bin/file/file.1 index 75f10ccbb06..6c86aeda1c3 100644 --- a/usr.bin/file/file.1 +++ b/usr.bin/file/file.1 @@ -1,28 +1,36 @@ -.\" $OpenBSD: file.1,v 1.18 2003/02/15 09:44:42 jmc Exp $ +.\" $OpenBSD: file.1,v 1.19 2003/03/11 21:26:26 ian Exp $ .\" $FreeBSD: src/usr.bin/file/file.1,v 1.16 2000/03/01 12:19:39 sheldonh Exp $ .\" -.\" 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. +.\" Copyright (c) Ian F. Darwin 1986-1995. +.\" Software written by Ian F. Darwin and others; +.\" maintained 1995-present by Christos Zoulas and others. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice immediately at the beginning of the file, without modification, +.\" this list of conditions, and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by Ian F. Darwin and others. +.\" 4. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. .\" .Dd July 30, 1997 .Dt FILE 1 diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index ba84ad6a4f3..eb584db6677 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,33 +1,42 @@ -/* $OpenBSD: file.c,v 1.10 2002/12/15 13:30:17 henning Exp $ */ +/* $OpenBSD: file.c,v 1.11 2003/03/11 21:26:26 ian Exp $ */ /* * 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. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ + #ifndef lint -static char *moduleid = "$OpenBSD: file.c,v 1.10 2002/12/15 13:30:17 henning Exp $"; +static char *moduleid = "$OpenBSD: file.c,v 1.11 2003/03/11 21:26:26 ian Exp $"; #endif /* lint */ #include <stdio.h> diff --git a/usr.bin/file/file.h b/usr.bin/file/file.h index ef4dbf22089..9847d2c352a 100644 --- a/usr.bin/file/file.h +++ b/usr.bin/file/file.h @@ -1,30 +1,38 @@ -/* $OpenBSD: file.h,v 1.11 2003/03/03 22:24:08 ian Exp $ */ +/* $OpenBSD: file.h,v 1.12 2003/03/11 21:26:26 ian Exp $ */ /* * 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. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #ifndef __file_h__ diff --git a/usr.bin/file/fsmagic.c b/usr.bin/file/fsmagic.c index 19175af6df6..e47ac48b186 100644 --- a/usr.bin/file/fsmagic.c +++ b/usr.bin/file/fsmagic.c @@ -1,30 +1,38 @@ -/* $OpenBSD: fsmagic.c,v 1.6 2001/11/19 19:02:13 mpech Exp $ */ +/* $OpenBSD: fsmagic.c,v 1.7 2003/03/11 21:26:26 ian Exp $ */ /* * 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. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include <stdio.h> @@ -53,7 +61,7 @@ #include "file.h" #ifndef lint -static char *moduleid = "$OpenBSD: fsmagic.c,v 1.6 2001/11/19 19:02:13 mpech Exp $"; +static char *moduleid = "$OpenBSD: fsmagic.c,v 1.7 2003/03/11 21:26:26 ian Exp $"; #endif /* lint */ int diff --git a/usr.bin/file/internat.c b/usr.bin/file/internat.c index efd6fcaf893..489d5d8aa34 100644 --- a/usr.bin/file/internat.c +++ b/usr.bin/file/internat.c @@ -1,4 +1,37 @@ -/* $OpenBSD: internat.c,v 1.2 2002/02/17 19:42:30 millert Exp $ */ +/* $OpenBSD: internat.c,v 1.3 2003/03/11 21:26:26 ian Exp $ */ + +/* + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ #include <stdio.h> #include <string.h> diff --git a/usr.bin/file/magic.5 b/usr.bin/file/magic.5 index 4c0a1c607e9..b8d410a003c 100644 --- a/usr.bin/file/magic.5 +++ b/usr.bin/file/magic.5 @@ -1,31 +1,39 @@ -.\" $OpenBSD: magic.5,v 1.7 2003/02/15 09:44:42 jmc Exp $ +.\" $OpenBSD: magic.5,v 1.8 2003/03/11 21:26:26 ian Exp $ .\" .\" @(#)$FreeBSD: src/usr.bin/file/magic.5,v 1.11 2000/03/01 12:19:39 sheldonh Exp $ .\" .\" install as magic.4 on USG, magic.5 on V7 or Berkeley systems. .\" -.\" 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. +.\" Copyright (c) Ian F. Darwin 1986-1995. +.\" Software written by Ian F. Darwin and others; +.\" maintained 1995-present by Christos Zoulas and others. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice immediately at the beginning of the file, without modification, +.\" this list of conditions, and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by Ian F. Darwin and others. +.\" 4. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. .\" .Dd September 3, 1994 .Dt MAGIC 5 diff --git a/usr.bin/file/names.h b/usr.bin/file/names.h index 23c99c83b52..1a6e47b380e 100644 --- a/usr.bin/file/names.h +++ b/usr.bin/file/names.h @@ -1,4 +1,4 @@ -/* $OpenBSD: names.h,v 1.3 1997/02/09 23:58:29 millert Exp $ */ +/* $OpenBSD: names.h,v 1.4 2003/03/11 21:26:26 ian Exp $ */ /* * Names.h - names and types used by ascmagic in file(1). @@ -7,10 +7,36 @@ * 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. - * - * See LEGAL.NOTICE + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* these types are used to index the table 'types': keep em in sync! */ diff --git a/usr.bin/file/patchlevel.h b/usr.bin/file/patchlevel.h index ac808a71f92..d4a4799905d 100644 --- a/usr.bin/file/patchlevel.h +++ b/usr.bin/file/patchlevel.h @@ -1,108 +1,39 @@ -/* $OpenBSD: patchlevel.h,v 1.4 1997/02/09 23:58:31 millert Exp $ */ +/* $OpenBSD: patchlevel.h,v 1.5 2003/03/11 21:26:26 ian Exp $ */ #define FILE_VERSION_MAJOR 3 #define patchlevel 22 /* - * Patchlevel file for Ian Darwin's MAGIC command. + * Patchlevel file for Ian Darwin's file(1) command. * - * Log: patchlevel.h,v - * Revision 1.22 1997/01/15 17:23:24 christos - * - add support for elf core files: find the program name under SVR4 [Ken Pizzini] - * - print strings only up to the first carriage return [various] - * - freebsd international ascii support [J Wunsch] - * - magic fixes and additions [Guy Harris] - * - 64 bit fixes [Larry Schwimmer] - * - support for both utime and utimes, but don't restore file access times - * by default [various] - * - \xXX only takes 2 hex digits, not 3. - * - re-implement support for core files [Guy Harris] - * - * Revision 1.21 1996/10/05 18:15:29 christos - * Segregate elf stuff and conditionally enable it with -DBUILTIN_ELF - * More magic fixes - * - * Revision 1.20 1996/06/22 22:15:52 christos - * - support relative offsets of the form >& - * - fix bug with truncating magic strings that contain \n - * - file -f - did not read from stdin as documented - * - support elf file parsing using our own elf support. - * - as always magdir fixes and additions. - * - * Revision 1.19 1995/10/27 23:14:46 christos - * Ability to parse colon separated list of magic files - * New LEGAL.NOTICE - * Various magic file changes - * - * Revision 1.18 1995/05/20 22:09:21 christos - * Passed incorrect argument to eatsize(). - * Use %ld and %lx where appropriate. - * Remove unused variables - * ELF support for both big and little endian - * Fixes for small files again. - * - * Revision 1.17 1995/04/28 17:29:13 christos - * - Incorrect nroff detection fix from der Mouse - * - Lost and incorrect magic entries. - * - Added ELF stripped binary detection [in C; ugh] - * - Look for $MAGIC to find the magic file. - * - Eat trailing size specifications from numbers i.e. ignore 10L - * - More fixes for very short files - * - * Revision 1.16 1995/03/25 22:06:45 christos - * - use strtoul() where it exists. - * - fix sign-extend bug - * - try to detect tar archives before nroff files, otherwise - * tar files where the first file starts with a . will not work - * - * Revision 1.15 1995/01/21 21:03:35 christos - * Added CSECTION for the file man page - * Added version flag -v - * Fixed bug with -f input flag (from iorio@violet.berkeley.edu) - * Lots of magic fixes and reorganization... - * - * Revision 1.14 1994/05/03 17:58:23 christos - * changes from mycroft@gnu.ai.mit.edu (Charles Hannum) for unsigned - * - * Revision 1.13 1994/01/21 01:27:01 christos - * Fixed null termination bug from Don Seeley at BSDI in ascmagic.c - * - * Revision 1.12 1993/10/27 20:59:05 christos - * Changed -z flag to understand gzip format too. - * Moved builtin compression detection to a table, and move - * the compress magic entry out of the source. - * Made printing of numbers unsigned, and added the mask to it. - * Changed the buffer size to 8k, because gzip will refuse to - * unzip just a few bytes. - * - * Revision 1.11 1993/09/24 18:49:06 christos - * Fixed small bug in softmagic.c introduced by - * copying the data to be examined out of the input - * buffer. Changed the Makefile to use sed to create - * the correct man pages. - * - * Revision 1.10 1993/09/23 21:56:23 christos - * Passed purify. Fixed indirections. Fixed byte order printing. - * Fixed segmentation faults caused by referencing past the end - * of the magic buffer. Fixed bus errors caused by referencing - * unaligned shorts or longs. - * - * Revision 1.9 1993/03/24 14:23:40 ian - * Batch of minor changes from several contributors. - * - * Revision 1.8 93/02/19 15:01:26 ian - * Numerous changes from Guy Harris too numerous to mention but including - * byte-order independance, fixing "old-style masking", etc. etc. A bugfix - * for broken symlinks from martin@@d255s004.zfe.siemens.de. - * - * Revision 1.7 93/01/05 14:57:27 ian - * Couple of nits picked by Christos (again, thanks). - * - * Revision 1.6 93/01/05 13:51:09 ian - * Lotsa work on the Magic directory. - * - * Revision 1.5 92/09/14 14:54:51 ian - * Fix a tiny null-pointer bug in previous fix for tar archive + uncompress. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ - diff --git a/usr.bin/file/print.c b/usr.bin/file/print.c index 93fa8498e50..e21fe7500d1 100644 --- a/usr.bin/file/print.c +++ b/usr.bin/file/print.c @@ -1,30 +1,38 @@ -/* $OpenBSD: print.c,v 1.8 2003/03/03 22:24:08 ian Exp $ */ +/* $OpenBSD: print.c,v 1.9 2003/03/11 21:26:26 ian Exp $ */ /* * 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. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include <stdio.h> @@ -38,7 +46,7 @@ #include "file.h" #ifndef lint -static char *moduleid = "$OpenBSD: print.c,v 1.8 2003/03/03 22:24:08 ian Exp $"; +static char *moduleid = "$OpenBSD: print.c,v 1.9 2003/03/11 21:26:26 ian Exp $"; #endif /* lint */ #define SZOF(a) (sizeof(a) / sizeof(a[0])) diff --git a/usr.bin/file/readelf.c b/usr.bin/file/readelf.c index 5cd235ebdd0..988f853af0a 100644 --- a/usr.bin/file/readelf.c +++ b/usr.bin/file/readelf.c @@ -1,3 +1,38 @@ +/* + * ELF routines for the file command. + * + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + #include "file.h" #ifdef BUILTIN_ELF @@ -11,7 +46,7 @@ #include "readelf.h" #ifndef lint -static char *RCSID = "@(#)$Id: readelf.c,v 1.4 2003/03/03 22:24:08 ian Exp $"; +static char *RCSID = "@(#)$Id: readelf.c,v 1.5 2003/03/11 21:26:26 ian Exp $"; #endif #ifdef ELFCORE diff --git a/usr.bin/file/readelf.h b/usr.bin/file/readelf.h index f7494de6b61..6d72e3a68bc 100644 --- a/usr.bin/file/readelf.h +++ b/usr.bin/file/readelf.h @@ -7,7 +7,39 @@ * Provide elf data structures for non-elf machines, allowing file * non-elf hosts to determine if an elf binary is stripped. * Note: cobbled from the linux header file, with modifications + * + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ + #ifndef __fake_elf_h__ #define __fake_elf_h__ diff --git a/usr.bin/file/softmagic.c b/usr.bin/file/softmagic.c index 8a6e8af579f..f7263626c44 100644 --- a/usr.bin/file/softmagic.c +++ b/usr.bin/file/softmagic.c @@ -1,30 +1,38 @@ -/* $OpenBSD: softmagic.c,v 1.8 2002/06/05 13:46:44 itojun Exp $ */ +/* $OpenBSD: softmagic.c,v 1.9 2003/03/11 21:26:26 ian Exp $ */ /* * 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. + * Copyright (c) Ian F. Darwin 1986-1995. + * Software written by Ian F. Darwin and others; + * maintained 1995-present by Christos Zoulas and others. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice immediately at the beginning of the file, without modification, + * this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Ian F. Darwin and others. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ #include <sys/types.h> @@ -37,7 +45,7 @@ #include "file.h" #ifndef lint -static char *moduleid = "$OpenBSD: softmagic.c,v 1.8 2002/06/05 13:46:44 itojun Exp $"; +static char *moduleid = "$OpenBSD: softmagic.c,v 1.9 2003/03/11 21:26:26 ian Exp $"; #endif /* lint */ static int match(unsigned char *, int); |