Skip to content

Commit

Permalink
Step 8: fix similar problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Laurie committed Apr 28, 2012
1 parent 95166e7 commit 098d103
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions contrib/bzip2/CONVERSION
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@
just assume this is so, and compiler errors will inform us if we just assume this is so, and compiler errors will inform us if we
are incorrect. are incorrect.


8. Continue in this vein until we hit a new problem.
5 changes: 4 additions & 1 deletion contrib/bzip2/bzip2.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ typedef int IntNative;


#undef blockSize100k #undef blockSize100k
#define blockSize100k _blockSize100k #define blockSize100k _blockSize100k
#undef verbosity
#define verbosity _verbosity


Int32 verbosity; Int32 verbosity;
Bool keepInputFiles, smallMode, deleteOutputOnInterrupt; Bool keepInputFiles, smallMode, deleteOutputOnInterrupt;
Bool forceOverwrite, testFailsExist, unzFailsExist, noisy; Bool forceOverwrite, testFailsExist, unzFailsExist, noisy;
Int32 numFileNames, numFilesProcessed, blockSize100k; Int32 numFileNames, numFilesProcessed, blockSize100k;
Int32 exitValue; Int32 exitValue;



/*-- source modes; F==file, I==stdin, O==stdout --*/ /*-- source modes; F==file, I==stdin, O==stdout --*/
#define SM_I2O 1 #define SM_I2O 1
#define SM_F2O 2 #define SM_F2O 2
Expand All @@ -206,6 +207,8 @@ Char tmpName[FILE_NAME_LEN];
Char *progName; Char *progName;
Char progNameReally[FILE_NAME_LEN]; Char progNameReally[FILE_NAME_LEN];
FILE *outputHandleJustInCase; FILE *outputHandleJustInCase;
#undef workFactor
#define workFactor _workFactor
Int32 workFactor; Int32 workFactor;


static void panic ( const Char* ) NORETURN; static void panic ( const Char* ) NORETURN;
Expand Down
9 changes: 6 additions & 3 deletions contrib/bzip2/bzip2_wrapped.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ void wrapped_compressStream ( FILE *stream, FILE *zStream );
Bool wrapped_uncompressStream ( FILE *zStream, FILE *stream ); Bool wrapped_uncompressStream ( FILE *zStream, FILE *stream );
Bool wrapped_testStream ( FILE *zStream ); Bool wrapped_testStream ( FILE *zStream );


extern Int32 _blockSize100k; extern Int32 _blockSize100k;
#define blockSize100k (*(const Int32 *)&_blockSize100k) #define blockSize100k (*(const Int32 *)&_blockSize100k)

extern Int32 _verbosity;
#define verbosity (*(const Int32 *)&_verbosity)
extern Int32 _workFactor;
#define workFactor (*(const Int32 *)&_workFactor)

0 comments on commit 098d103

Please sign in to comment.