-************************************ * Command Line **************************************/ print help either in `stderr` or `stdout` depending on originating request * error (badusage) => stderr * help (usage_advanced) => stdout */
| 111 | * help (usage_advanced) => stdout |
| 112 | */ |
| 113 | static void usage(FILE* f, const char* programName) |
| 114 | { |
| 115 | DISPLAY_F(f, "Usage : \n"); |
| 116 | DISPLAY_F(f, " %s [args] [FILE(s)] [-o file] \n", programName); |
| 117 | DISPLAY_F(f, "\n"); |
| 118 | DISPLAY_F(f, "FILE : a filename \n"); |
| 119 | DISPLAY_F(f, " with no FILE, or when FILE is - , read standard input\n"); |
| 120 | DISPLAY_F(f, "Arguments : \n"); |
| 121 | #ifndef ZSTD_NOCOMPRESS |
| 122 | DISPLAY_F(f, " -# : # compression level (1-%d, default: %d) \n", ZSTDCLI_CLEVEL_MAX, ZSTDCLI_CLEVEL_DEFAULT); |
| 123 | #endif |
| 124 | #ifndef ZSTD_NODECOMPRESS |
| 125 | DISPLAY_F(f, " -d : decompression \n"); |
| 126 | #endif |
| 127 | DISPLAY_F(f, " -D DICT: use DICT as Dictionary for compression or decompression \n"); |
| 128 | DISPLAY_F(f, " -o file: result stored into `file` (only 1 output file) \n"); |
| 129 | DISPLAY_F(f, " -f : overwrite output without prompting, also (de)compress links \n"); |
| 130 | DISPLAY_F(f, "--rm : remove source file(s) after successful de/compression \n"); |
| 131 | DISPLAY_F(f, " -k : preserve source file(s) (default) \n"); |
| 132 | DISPLAY_F(f, " -h/-H : display help/long help and exit \n"); |
| 133 | } |
| 134 | |
| 135 | static void usage_advanced(const char* programName) |
| 136 | { |
no outgoing calls
no test coverage detected