From 6127186d3cd6e65aa95c853b6d5e12590e4e4d10 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Tue, 20 Aug 1996 20:49:39 +0000 Subject: [PATCH] a header file for zopen.3 Pointed out by: Philippe Charnier --- sbin/savecore/Makefile | 5 ++++- sbin/savecore/savecore.c | 1 + usr.bin/compress/zopen.3 | 2 +- usr.bin/compress/zopen.c | 1 + usr.bin/compress/zopen.h | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 usr.bin/compress/zopen.h diff --git a/sbin/savecore/Makefile b/sbin/savecore/Makefile index 71a17f229f93..33b2dbe2e335 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 diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index a9929a89713f..c38712899e85 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 #include #include +#include "zopen.h" #define ok(number) ((number) - KERNBASE) diff --git a/usr.bin/compress/zopen.3 b/usr.bin/compress/zopen.3 index 853462f5057a..3d7666ecf459 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 +.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 510b895e47be..5e5357b74b9e 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 #include #include +#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 000000000000..322fd2de9a23 --- /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_ */