From 8a74697e3d92d2da8bf38c3fa90d576939473537 Mon Sep 17 00:00:00 2001 From: mjl Date: Fri, 15 Mar 2002 01:54:19 +0000 Subject: [PATCH] Make it compile w/ our standard warning level by adding prototypes. --- dist/bzip2/bzip2.c | 3 ++- dist/bzip2/bzip2recover.c | 42 +++++++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/dist/bzip2/bzip2.c b/dist/bzip2/bzip2.c index 303b7717841a..b2210b38c582 100644 --- a/dist/bzip2/bzip2.c +++ b/dist/bzip2/bzip2.c @@ -1,4 +1,4 @@ -/* $NetBSD: bzip2.c,v 1.1.1.2 2002/03/15 01:35:24 mjl Exp $ */ +/* $NetBSD: bzip2.c,v 1.2 2002/03/15 01:54:19 mjl Exp $ */ /*-----------------------------------------------------------*/ @@ -316,6 +316,7 @@ static void copyFileName ( Char*, Char* ); static void* myMalloc ( Int32 ); +FILE* fopen_output_safely ( Char*, const char* ); /*---------------------------------------------------*/ /*--- An implementation of 64-bit ints. Sigh. ---*/ diff --git a/dist/bzip2/bzip2recover.c b/dist/bzip2/bzip2recover.c index abbe520005ef..e9a7b36d1f2d 100644 --- a/dist/bzip2/bzip2recover.c +++ b/dist/bzip2/bzip2recover.c @@ -1,4 +1,4 @@ -/* $NetBSD: bzip2recover.c,v 1.3 2002/03/15 01:44:24 mjl Exp $ */ +/* $NetBSD: bzip2recover.c,v 1.4 2002/03/15 01:54:20 mjl Exp $ */ /*-----------------------------------------------------------*/ @@ -100,6 +100,32 @@ Char progName[BZ_MAX_FILENAME]; MaybeUInt64 bytesOut = 0; MaybeUInt64 bytesIn = 0; +/*---------------------------------------------------*/ +/*--- Bit stream I/O ---*/ +/*---------------------------------------------------*/ + +typedef + struct { + FILE* handle; + Int32 buffer; + Int32 buffLive; + Char mode; + } + BitStream; + +void readError ( void ); +void writeError ( void ); +void mallocFail ( Int32 n ); +BitStream* bsOpenReadStream ( FILE* stream ); +BitStream* bsOpenWriteStream ( FILE* stream ); +void bsPutBit ( BitStream* bs, Int32 bit ); +Int32 bsGetBit ( BitStream* bs ); +void bsClose ( BitStream* bs ); +void bsPutUChar ( BitStream* bs, UChar c ); +void bsPutUInt32 ( BitStream* bs, UInt32 c ); +Bool endsInBz2 ( Char* name ); +void tooManyBlocks ( Int32 max_handled_blocks ); + /*---------------------------------------------------*/ /*--- Header bytes ---*/ @@ -170,20 +196,6 @@ void tooManyBlocks ( Int32 max_handled_blocks ) -/*---------------------------------------------------*/ -/*--- Bit stream I/O ---*/ -/*---------------------------------------------------*/ - -typedef - struct { - FILE* handle; - Int32 buffer; - Int32 buffLive; - Char mode; - } - BitStream; - - /*---------------------------------------------*/ BitStream* bsOpenReadStream ( FILE* stream ) {