$NetBSD: patch-aa,v 1.4 2011/08/01 15:21:16 joerg Exp $ --- bunzip021.c.orig 1999-05-22 21:00:00.000000000 +0000 +++ bunzip021.c @@ -114,9 +114,9 @@ --*/ #if BZ_UNIX_32 + #include #include #include - #include #include #include @@ -141,7 +141,7 @@ run rather slowly. gcc version 2.x is recommended. --*/ #ifdef __GNUC__ - #define INLINE inline + #define INLINE static inline #define NORETURN __attribute__ ((noreturn)) #else #define INLINE /**/ @@ -400,7 +400,8 @@ Int32 bytesIn, bytesOut; Bool verbose, veryVerbose; -Bool compressing, keepInputFiles; +#define compressing False +Bool keepInputFiles; UInt32 globalCrc; #define OM_FILES_TO_FILES 1 @@ -2376,17 +2377,13 @@ void usage ( Char *fullProgName ) "\nusage: %s [flags and input files in any order]\n" "\n" " Flags: -d force decompression\n" - " -f force compression\n" " -c output to standard out\n" " -v, -V be verbose, or very verbose\n" " -k keep (don't delete) input files\n" " -L display software license\n" " -1 .. -9 set block size of 100k .. 900k\n" "\n" - " If invoked as `bzip', the default action is to compress.\n" - " as `bunzip', the default action is to decompress.\n" - "\n" - " If no file names are given, bzip compresses or decompresses\n" + " If no file names are given, bunzip decompresses\n" " from standard input to standard output. You can combine\n" " flags, so `-v -e -4' means the same as -ve4 or -4ev, &c.\n" "\n" @@ -2542,7 +2539,6 @@ IntNative main ( IntNative argc, Char *a } keepInputFiles = False; - compressing = True; verbose = False; veryVerbose = False; @@ -2550,12 +2546,6 @@ IntNative main ( IntNative argc, Char *a opMode = OM_STDIN_TO_STDOUT; else opMode = OM_FILES_TO_FILES; - if ( (strcmp ( "bunzip", progName ) == 0) || - (strcmp ( "BUNZIP", progName ) == 0) || - (strcmp ( "bunzip.exe", progName ) == 0) || - (strcmp ( "BUNZIP.EXE", progName ) == 0) ) - compressing = False; - if (compressing) blockSize100k = 9; for (aa = argList; aa != NULL; aa = aa->link) @@ -2564,8 +2554,7 @@ IntNative main ( IntNative argc, Char *a switch (aa->name[j]) { case 'Q': break; case 'c': opMode = OM_FILE_TO_STDOUT; break; - case 'd': compressing = False; break; - case 'f': compressing = True; break; + case 'd': break; case 'v': verbose = True; break; case 'k': keepInputFiles = True; break; case '1': blockSize100k = 1; break; @@ -2593,7 +2582,6 @@ IntNative main ( IntNative argc, Char *a exit ( 1 ); } - compressing = False; if ( !compressing ) blockSize100k = 0; {