summaryrefslogtreecommitdiff
path: root/archivers/bunzip/patches/patch-aa
blob: ef331a27f8668c3669211e97df00d8d6b6fc1fba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
$NetBSD: patch-aa,v 1.2 2002/03/11 14:21:25 yyamano Exp $

--- bunzip021.c.orig	Thu Feb 28 06:11:49 2002
+++ bunzip021.c
@@ -116,7 +116,9 @@
 #if BZ_UNIX_32
    #include <utime.h>
    #include <unistd.h>
+#ifndef __APPLE__
    #include <malloc.h>
+#endif
    #include <sys/stat.h>
    #include <sys/times.h>
 
@@ -400,7 +402,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 +2379,13 @@
       "\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 +2541,6 @@
       }
 
    keepInputFiles  = False;
-   compressing     = True;
    verbose         = False;
    veryVerbose     = False;
 
@@ -2550,12 +2548,6 @@
       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 +2556,7 @@
             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 +2584,6 @@
       exit ( 1 );
    }
 
-   compressing = False;
    if ( !compressing ) blockSize100k = 0;
 
    {