Author: Adam <git@apiote.tk>
add usage
meowsum.c | 15 +++++++++++----
diff --git a/meowsum.c b/meowsum.c index c93b4311cd64d257815bed7eb9f6b589880e4d4c..94b05bc4b813a5a81c0160bfd9a3f5e081c85c78 100644 --- a/meowsum.c +++ b/meowsum.c @@ -16,10 +16,17 @@ #includevoid print_usage() { printf("usage: meowsum [OPTION]... [FILE]...\n"); - // -c -> read sums from FILE and check them - // -q -> when -c, only return status; do not print OK, FAIL(, MISSING) - // -e -> when -c, fail for missing files - // -s (32|64|*128) -> set hash size + printf("Print or check Meow hash checksums.\n"); + printf("\n"); + printf("When FILE is -, read standard input.\n"); + printf("\n"); + printf(" -c read sums from the FILEs and check them\n"); + printf(" -s size set hash size; size can be 32, 64, 128 bits;\n"); + printf(" the default is 128\n"); + printf("\n"); + printf("The following options are useful only when verifying checksums:\n"); + printf(" -q only return status; do not print OK, ERH, ERS, ERM\n"); + printf(" -e fail for missing files\n"); } void parse_args(int argc, char *argv[], bool *quiet, bool *strict_error,