a header file for zopen.3

Pointed out by: Philippe Charnier <charnier@lirmm.fr>
This commit is contained in:
wosch 1996-08-20 20:49:39 +00:00
parent 9d6deeff0a
commit 5b1f465721
5 changed files with 41 additions and 2 deletions

View File

@ -3,6 +3,9 @@
PROG= savecore PROG= savecore
SRCS= savecore.c zopen.c SRCS= savecore.c zopen.c
MAN8= savecore.8 MAN8= savecore.8
.PATH: ${.CURDIR}/../../usr.bin/compress
ZOPENPATH= ${.CURDIR}/../../usr.bin/compress
.PATH: ${ZOPENPATH}
CFLAGS+= -I${ZOPENPATH}
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -60,6 +60,7 @@ static char sccsid[] = "@(#)savecore.c 8.3 (Berkeley) 1/2/94";
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include "zopen.h"
#define ok(number) ((number) - KERNBASE) #define ok(number) ((number) - KERNBASE)

View File

@ -38,7 +38,7 @@
.Nm zopen .Nm zopen
.Nd compressed stream open function .Nd compressed stream open function
.Sh SYNOPSIS .Sh SYNOPSIS
.Fd #include <stdio.h> .Fd #include "zopen.h"
.Ft FILE * .Ft FILE *
.Fn zopen "const char *path" "const char *mode" "int bits" .Fn zopen "const char *path" "const char *mode" "int bits"
.Sh DESCRIPTION .Sh DESCRIPTION

View File

@ -71,6 +71,7 @@ static char sccsid[] = "@(#)zopen.c 8.1 (Berkeley) 6/27/93";
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include "zopen.h"
#define BITS 16 /* Default bits. */ #define BITS 16 /* Default bits. */
#define HSIZE 69001 /* 95% occupancy */ #define HSIZE 69001 /* 95% occupancy */

34
usr.bin/compress/zopen.h Normal file
View File

@ -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_ */