reduced usage of puts
This commit is contained in:
parent
946350c88b
commit
f763f476fb
38
src/main.cc
38
src/main.cc
@ -16,25 +16,25 @@ using ustring = std::basic_string<uint8_t>; // chaine non encodée
|
|||||||
using uvec = std::vector<uint32_t>; // chaine encodée
|
using uvec = std::vector<uint32_t>; // chaine encodée
|
||||||
|
|
||||||
void help() {
|
void help() {
|
||||||
puts("Usage:");
|
puts("Usage:\n\
|
||||||
puts("lzw [-options] [-i path] [-o path]\n");
|
lzw [-options] [-i path] [-o path]\n\n\
|
||||||
puts("The default action is to compress the input file to a .lzw file");
|
The default action is to compress the input file to a .lzw file\n\
|
||||||
puts("in which the directory in which the software is executed.");
|
in which the directory in which the software is executed.\n\
|
||||||
puts("Options available:");
|
Options available:\n\
|
||||||
puts("-h --help");
|
-h --help\n\
|
||||||
puts("\tdisplay the current message");
|
\tdisplay the current message\n\
|
||||||
puts("-i --input");
|
-i --input\n\
|
||||||
puts("\tpath to the input file (MANDATORY)");
|
\tpath to the input file (MANDATORY)\n\
|
||||||
puts("-o --output");
|
-o --output\n\
|
||||||
puts("\tpath to the output file (if the file already exists, it will be\n");
|
\tpath to the output file (if the file already exists, it will be\n\n\
|
||||||
puts("\toverwritten). Default: input path + \".lzw\"");
|
\toverwritten). Default: input path + \".lzw\\n\
|
||||||
puts("-c --compress");
|
-c --compress\n\
|
||||||
puts("\tcompress the input file");
|
\tcompress the input file\n\
|
||||||
puts("-u --uncompress");
|
-u --uncompress\n\
|
||||||
puts("\tuncompresses the input file to the output file. If no output path");
|
\tuncompresses the input file to the output file. If no output path\n\
|
||||||
puts("\thas not been entered and if the input file ends with \".lzw\",");
|
\thas not been entered and if the input file ends with \".lzw\",\n\
|
||||||
puts("\tthe extension \".lzw\" will be removed; otherwise, the extension");
|
\tthe extension \".lzw\" will be removed; otherwise, the extension\n\
|
||||||
puts("\t\"_uncompresed\" will be added");
|
\t\"_uncompresed\" will be added");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<string, string, bool> process_args(int t_argc, char *t_argv[]) {
|
std::tuple<string, string, bool> process_args(int t_argc, char *t_argv[]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user