--- pgp/src/zunzip.h 2018/04/24 16:38:40 1.1.1.2 +++ pgp/src/zunzip.h 2018/04/24 16:39:22 1.1.1.3 @@ -15,6 +15,8 @@ /* OS-Dependent Includes */ /***************************/ +#include "usuals.h" +#include "system.h" #ifndef MINIX /* Minix needs it after all the other includes (?) */ # include /* this is your standard header for all C compiles */ @@ -46,7 +48,6 @@ # define NO_MKDIR /* for mapped_name() */ # endif /* !AMIGA && !MINIX */ # include - struct tm *gmtime(), *localtime(); # else /* BSD */ # include # include @@ -191,21 +192,24 @@ /* Typedefs */ /**************/ -#ifndef _BULL_SOURCE /* Bull has it defined somewhere already */ - typedef unsigned char byte; /* code assumes UNSIGNED bytes */ -#endif /* !_BULL_SOURCE */ - typedef long longint; typedef unsigned short UWORD; #ifndef OS2 typedef unsigned long ULONG; #endif -typedef char boolean; /*************************/ /* Function Prototypes */ /*************************/ +#ifdef PROTO + +/* The following is for non-ansi compilers supporting prototypes */ +/* (e.g. old SGI compilers and Borland C in non-ansi mode */ + +#define __(X) X /* Inc. Should probably give them a call and see */ +#endif + #ifndef __ /* This amusing little construct was swiped without */ # if __STDC__ /* permission from the fine folks at Cray Research, */ # define __(X) X /* Inc. Should probably give them a call and see */ @@ -260,8 +264,15 @@ int unzip __( ( FILE *inFile, FILE *o */ -#define READBIT(nbits,zdest) {if(nbits>bits_left) FillBitBuffer();\ - zdest=(int)(bitbuf&mask_bits[nbits]); bitbuf>>=nbits; bits_left-=nbits;} +#define READBIT(nbits,zdest) \ + do \ + { \ + if(nbits>bits_left) \ + FillBitBuffer(); \ + zdest=(int)(bitbuf&mask_bits[nbits]); \ + bitbuf>>=nbits; \ + bits_left-=nbits; \ + } while(0) /* * macro READBIT(nbits,zdest) @@ -282,7 +293,6 @@ int unzip __( ( FILE *inFile, FILE *o /*************/ extern longint csize; - extern longint ucsize; extern ULONG mask_bits[];