diff options
author | wosch <wosch@FreeBSD.org> | 1996-08-20 20:49:39 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1996-08-20 20:49:39 +0000 |
commit | b72054ac4e84a412bb420ad1210784d47430ab57 (patch) | |
tree | 218f9a68e87a236e31881c6a92e36335c0abcbd7 | |
parent | 614886b14345b7c5cac15a687107d6911b2467d7 (diff) | |
download | FreeBSD-src-b72054ac4e84a412bb420ad1210784d47430ab57.zip FreeBSD-src-b72054ac4e84a412bb420ad1210784d47430ab57.tar.gz |
a header file for zopen.3
Pointed out by: Philippe Charnier <charnier@lirmm.fr>
-rw-r--r-- | sbin/savecore/Makefile | 5 | ||||
-rw-r--r-- | sbin/savecore/savecore.c | 1 | ||||
-rw-r--r-- | usr.bin/compress/zopen.3 | 2 | ||||
-rw-r--r-- | usr.bin/compress/zopen.c | 1 | ||||
-rw-r--r-- | usr.bin/compress/zopen.h | 34 |
5 files changed, 41 insertions, 2 deletions
diff --git a/sbin/savecore/Makefile b/sbin/savecore/Makefile index 71a17f2..33b2dbe 100644 --- a/sbin/savecore/Makefile +++ b/sbin/savecore/Makefile @@ -3,6 +3,9 @@ PROG= savecore SRCS= savecore.c zopen.c MAN8= savecore.8 -.PATH: ${.CURDIR}/../../usr.bin/compress + +ZOPENPATH= ${.CURDIR}/../../usr.bin/compress +.PATH: ${ZOPENPATH} +CFLAGS+= -I${ZOPENPATH} .include <bsd.prog.mk> diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index a9929a8..c387128 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -60,6 +60,7 @@ static char sccsid[] = "@(#)savecore.c 8.3 (Berkeley) 1/2/94"; #include <stdlib.h> #include <string.h> #include <unistd.h> +#include "zopen.h" #define ok(number) ((number) - KERNBASE) diff --git a/usr.bin/compress/zopen.3 b/usr.bin/compress/zopen.3 index 853462f..3d7666e 100644 --- a/usr.bin/compress/zopen.3 +++ b/usr.bin/compress/zopen.3 @@ -38,7 +38,7 @@ .Nm zopen .Nd compressed stream open function .Sh SYNOPSIS -.Fd #include <stdio.h> +.Fd #include "zopen.h" .Ft FILE * .Fn zopen "const char *path" "const char *mode" "int bits" .Sh DESCRIPTION diff --git a/usr.bin/compress/zopen.c b/usr.bin/compress/zopen.c index 510b895..5e5357b 100644 --- a/usr.bin/compress/zopen.c +++ b/usr.bin/compress/zopen.c @@ -71,6 +71,7 @@ static char sccsid[] = "@(#)zopen.c 8.1 (Berkeley) 6/27/93"; #include <stdlib.h> #include <string.h> #include <unistd.h> +#include "zopen.h" #define BITS 16 /* Default bits. */ #define HSIZE 69001 /* 95% occupancy */ diff --git a/usr.bin/compress/zopen.h b/usr.bin/compress/zopen.h new file mode 100644 index 0000000..322fd2d --- /dev/null +++ b/usr.bin/compress/zopen.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 1996 + * FreeBSD Inc. All rights reserved. + * + * 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, 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. + * + * THIS SOFTWARE IS PROVIDED BY FreeBSD Inc. 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 [your name] 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. + * + * $Id$ + */ + +#ifndef _ZOPEN_H_ +#define _ZOPEN_H_ + +FILE *zopen __P((const char *, const char *, int)); + +#endif /* _ZOPEN_H_ */ |