From 5bb63f1bca12557fab6f2f709a64298f7da7c8e7 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 21 Sep 2017 16:15:32 +0200 Subject: [PATCH] hashsum: improve help --- demos/hashsum.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/demos/hashsum.c b/demos/hashsum.c index 69dd2f2..164bd68 100644 --- a/demos/hashsum.c +++ b/demos/hashsum.c @@ -47,13 +47,15 @@ static void die(int status) { unsigned long w, x; FILE* o = status == EXIT_SUCCESS ? stdout : stderr; - fprintf(o, "usage: %s -a algorithm [-c] [file...]\n", hashsum); - fprintf(o, "Algorithms:\n"); + fprintf(o, "usage: %s -a algorithm [-c] [file...]\n\n", hashsum); + fprintf(o, "\t-c\tCheck the hash(es) of the file(s) written in [file].\n"); + fprintf(o, "\t\t(-a not required)\n"); + fprintf(o, "\nAlgorithms:\n\t"); w = 0; for (x = 0; hash_descriptor[x].name != NULL; x++) { w += fprintf(o, "%-14s", hash_descriptor[x].name); if (w >= 70) { - fprintf(o, "\n"); + fprintf(o, "\n\t"); w = 0; } }