Rename passThrough to testMode

This commit is contained in:
Nick Terrell 2016-11-03 18:50:25 -07:00
parent 04d728b87b
commit 136caa552b
3 changed files with 10 additions and 10 deletions

View File

@ -393,7 +393,7 @@ int main(int argc, const char** argv)
case 'c': forceStdout=1; output_filename=stdoutmark; displayLevel=1; break;
/* Test integrity */
case 't': decode=1; LZ4IO_setPassThrough(0); output_filename=nulmark; break;
case 't': decode=1; LZ4IO_setTestMode(1); output_filename=nulmark; break;
/* Overwrite */
case 'f': LZ4IO_setOverwrite(1); break;

View File

@ -136,7 +136,7 @@ static clock_t g_time = 0;
* Local Parameters
**************************************/
static int g_overwrite = 1;
static int g_passThrough = 1;
static int g_testMode = 0;
static int g_blockSizeId = LZ4IO_BLOCKSIZEID_DEFAULT;
static int g_blockChecksum = 0;
static int g_streamChecksum = 1;
@ -185,11 +185,11 @@ int LZ4IO_setOverwrite(int yes)
return g_overwrite;
}
/* Default setting : passThrough = 1; return : passThrough mode (0/1) */
int LZ4IO_setPassThrough(int yes)
/* Default setting : testMode = 0; return : testMode (0/1) */
int LZ4IO_setTestMode(int yes)
{
g_passThrough = (yes!=0);
return g_passThrough;
g_testMode = (yes!=0);
return g_testMode;
}
/* blockSizeID : valid values : 4-5-6-7 */
@ -916,7 +916,7 @@ static unsigned long long selectDecoder(dRess_t ress, FILE* finput, FILE* foutpu
EXTENDED_FORMAT; /* macro extension for custom formats */
default:
if (nbCalls == 1) { /* just started */
if (g_passThrough && g_overwrite)
if (!g_testMode && g_overwrite)
return LZ4IO_passThrough(finput, foutput, MNstore);
EXM_THROW(44,"Unrecognized header : file cannot be decoded"); /* Wrong magic number at the beginning of 1st stream */
}

View File

@ -63,9 +63,9 @@ int LZ4IO_decompressMultipleFilenames(const char** inFileNamesTable, int ifntSiz
return : overwrite mode (0/1) */
int LZ4IO_setOverwrite(int yes);
/* Default setting : passThrough = 1;
return : passThrough mode (0/1) */
int LZ4IO_setPassThrough(int yes);
/* Default setting : testMode = 0;
return : testMode (0/1) */
int LZ4IO_setTestMode(int yes);
/* blockSizeID : valid values : 4-5-6-7
return : -1 if error, blockSize if OK */