Lines Matching full:if
18 with this program; if not, write to the Free Software Foundation, Inc.,
72 #define DISPLAYLEVEL(l, ...) if (displayLevel>=l) { DISPLAY(__VA_ARGS__); }
80 #define DEBUGOUTPUT(...) if (DEBUG) DISPLAY(__VA_ARGS__);
134 DISPLAY( " -c : force write to standard output, even if it is the console\n"); in usage_advanced()
157 if (g_lz4c_legacy_commands) { in usage_advanced()
181 DISPLAY( " - if stdout is not the console, then [output] = stdout \n"); in usage_longhelp()
182 DISPLAY( " - if stdout is console : \n"); in usage_longhelp()
185 …DISPLAY( " > if input filename has no '%s' extension : error \n", LZ4_EXTENSION… in usage_longhelp()
196 DISPLAY( "except if '-c' command is specified, to force output to console \n"); in usage_longhelp()
205 DISPLAY( "2 : compress 'filename' in high compression mode, overwrite output if exists\n"); in usage_longhelp()
214 if (g_lz4c_legacy_commands) { in usage_longhelp()
231 if (displayLevel >= 1) usage(exeName); in badusage()
245 if (strrchr(name, '/')) name = strrchr(name, '/') + 1; in lastNameFromPath()
246 if (strrchr(name, '\\')) name = strrchr(name, '\\') + 1; /* windows */ in lastNameFromPath()
251 @return : a non-zero value if exeName matches test, excluding the extension
263 * Note : function result can overflow if digit string > MAX_UINT */
272 if ((**stringPtr=='K') || (**stringPtr=='M')) { in readU32FromChar()
274 if (**stringPtr=='M') result <<= 10; in readU32FromChar()
276 if (**stringPtr=='i') (*stringPtr)++; in readU32FromChar()
277 if (**stringPtr=='B') (*stringPtr)++; in readU32FromChar()
283 * check if *stringPtr is the same as longCommand.
284 * If yes, @return 1 and advances *stringPtr to the position which immediately follows longCommand.
291 if (result) *stringPtr += comSize; in longCommandWArg()
299 * @return `om_decompress` if input filename has .lz4 extension and `om_compress` otherwise.
306 if (!strcmp(inputFilename+extStart, LZ4_EXTENSION)) return om_decompress; in determineOpMode()
340 if (inFileNames==NULL) {
348 if (exeNameMatch(exeName, LZ4CAT)) {
358 if (exeNameMatch(exeName, UNLZ4)) { mode = om_decompress; }
359 if (exeNameMatch(exeName, LZ4_LEGACY)) { g_lz4c_legacy_commands=1; }
365 if(!argument) continue; /* Protection if argument empty */
368 if (!all_arguments_are_files && argument[0]=='-') {
370 if (argument[1]==0) {
371 if (!input_filename) input_filename=stdinmark;
377 if (argument[1]=='-') {
378 if (!strcmp(argument, "--")) { all_arguments_are_files = 1; continue; }
379 if (!strcmp(argument, "--compress")) { mode = om_compress; continue; }
380 if ((!strcmp(argument, "--decompress"))
382 if (!strcmp(argument, "--multiple")) { multiple_inputs = 1; continue; }
383 if (!strcmp(argument, "--test")) { mode = om_test; continue; }
384 if (!strcmp(argument, "--force")) { LZ4IO_setOverwrite(prefs, 1); continue; }
385 if (!strcmp(argument, "--no-force")) { LZ4IO_setOverwrite(prefs, 0); continue; }
386 if ((!strcmp(argument, "--stdout"))
388 … if (!strcmp(argument, "--frame-crc")) { LZ4IO_setStreamChecksumMode(prefs, 1); continue; }
389 … if (!strcmp(argument, "--no-frame-crc")) { LZ4IO_setStreamChecksumMode(prefs, 0); continue; }
390 … if (!strcmp(argument, "--content-size")) { LZ4IO_setContentSize(prefs, 1); continue; }
391 … if (!strcmp(argument, "--no-content-size")) { LZ4IO_setContentSize(prefs, 0); continue; }
392 if (!strcmp(argument, "--list")) { mode = om_list; continue; }
393 if (!strcmp(argument, "--sparse")) { LZ4IO_setSparseFile(prefs, 2); continue; }
394 if (!strcmp(argument, "--no-sparse")) { LZ4IO_setSparseFile(prefs, 0); continue; }
395 … if (!strcmp(argument, "--favor-decSpeed")) { LZ4IO_favorDecSpeed(prefs, 1); continue; }
396 if (!strcmp(argument, "--verbose")) { displayLevel++; continue; }
397 if (!strcmp(argument, "--quiet")) { if (displayLevel) displayLevel--; continue; }
398 if (!strcmp(argument, "--version")) { DISPLAYOUT(WELCOME_MESSAGE); goto _cleanup; }
399 if (!strcmp(argument, "--help")) { usage_advanced(exeName); goto _cleanup; }
400 …if (!strcmp(argument, "--keep")) { LZ4IO_setRemoveSrcFile(prefs, 0); continue; } /* keep source…
401 if (!strcmp(argument, "--rm")) { LZ4IO_setRemoveSrcFile(prefs, 1); continue; }
402 if (longCommandWArg(&argument, "--fast")) {
404 if (*argument == '=') {
408 if (fastLevel) {
413 } else if (*argument != 0) {
423 if (!strcmp(argument, "--best")) { cLevel=LZ4HC_CLEVEL_MAX; continue; }
429 if (g_lz4c_legacy_commands) {
431 … if (!strcmp(argument, "c0")) { cLevel=0; argument++; continue; } /* -c0 (fast compression) */
432 … if (!strcmp(argument, "c1")) { cLevel=9; argument++; continue; } /* -c1 (high compression) */
433 …if (!strcmp(argument, "c2")) { cLevel=12; argument++; continue; } /* -c2 (very high compression) …
434 …if (!strcmp(argument, "hc")) { cLevel=12; argument++; continue; } /* -hc (very high compression) …
435 …if (!strcmp(argument, "y")) { LZ4IO_setOverwrite(prefs, 1); continue; } /* -y (answer 'yes' to o…
438 if ((*argument>='0') && (*argument<='9')) {
462 if (argument[1] == '\0') {
464 if (i + 1 == argc) {
483 /* Force stdout, even if stdout==console */
500 case 'q': if (displayLevel) displayLevel--; break;
515 if (argument[1] < '0' || argument[1] > '9') {
523 if (B < 4) badusage(exeName);
524 if (B <= 7) {
529 if (B < 32) badusage(exeName);
532 if (blockSize >= 1024) {
541 if (exitBlockProperties) break;
569 BMK_setNbSeconds(iters); /* notification if displayLevel >= 3 */
583 /* Store in *inFileNames[] if -m is used. */
584 if (multiple_inputs) { inFileNames[ifnIdx++]=argument; continue; }
587 if (!input_filename) { input_filename=argument; continue; }
590 if (!output_filename) {
592 if (!strcmp (output_filename, nullOutput)) output_filename = nulmark;
613 if ((mode == om_compress) || (mode == om_bench))
616 if (multiple_inputs) {
619 …if (recursive) { /* at this stage, filenameTable is a list of paths, which can contain both files…
621 if (extendedFileList) {
631 if (dictionary_filename) {
632 if (!strcmp(dictionary_filename, stdinmark) && IS_CONSOLE(stdin)) {
640 if (mode == om_bench) {
646 if (mode == om_test) {
653 if (!input_filename) input_filename = stdinmark;
654 /* Check if input is defined as console; trigger an error in this case */
655 if (!strcmp(input_filename, stdinmark) && IS_CONSOLE(stdin) ) {
659 if (!strcmp(input_filename, stdinmark)) {
660 /* if input==stdin and no output defined, stdout becomes default output */
661 if (!output_filename) output_filename = stdoutmark;
665 if (!recursive && !UTIL_isRegFile(input_filename)) {
667 if (!UTIL_isRegFile(input_filename)) {
676 if (!IS_CONSOLE(stdout) && mode != om_list) {
685 … if (mode == om_auto) { /* auto-determine compression or decompression, based on file extension */
688 if (mode == om_compress) { /* compression to file */
691 if (dynNameSpace==NULL) { perror(exeName); exit(1); }
698 …if (mode == om_decompress) {/* decompression to file (automatic name will work only if input filen…
702 if (dynNameSpace==NULL) { perror(exeName); exit(1); }
705 if (inl>4)
707 …if (outl != inl-5) { DISPLAYLEVEL(1, "Cannot determine an output filename\n"); badusage(exeName); }
714 if (mode == om_list){
715 /* Exit if trying to read from stdin as this isn't supported in this mode */
716 if(!strcmp(input_filename, stdinmark)){
720 if(!multiple_inputs){
725 if (multiple_inputs==0) assert(output_filename);
729 if (!output_filename) output_filename = "*\\dummy^!//";
731 /* Check if output is defined as console; trigger an error in this case */
732 if (!strcmp(output_filename,stdoutmark) && IS_CONSOLE(stdout) && !forceStdout) {
737 if (!strcmp(output_filename,stdoutmark) && (displayLevel==2)) displayLevel=1;
738 if ((multiple_inputs) && (displayLevel==2)) displayLevel=1;
741 if (mode == om_auto) {
747 if (ifnIdx == 0) multiple_inputs = 0;
748 if (mode == om_decompress) {
749 if (multiple_inputs) {
756 } else if (mode == om_list){
759 if (legacy_format) {
761 if(multiple_inputs){
768 if (multiple_inputs) {
777 if (main_pause) waitEnter();
780 if (extendedFileList) {