Skip to content

Commit 5bb63f1

Browse files
committed
hashsum: improve help
1 parent eb75c89 commit 5bb63f1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

demos/hashsum.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ static void die(int status)
4747
{
4848
unsigned long w, x;
4949
FILE* o = status == EXIT_SUCCESS ? stdout : stderr;
50-
fprintf(o, "usage: %s -a algorithm [-c] [file...]\n", hashsum);
51-
fprintf(o, "Algorithms:\n");
50+
fprintf(o, "usage: %s -a algorithm [-c] [file...]\n\n", hashsum);
51+
fprintf(o, "\t-c\tCheck the hash(es) of the file(s) written in [file].\n");
52+
fprintf(o, "\t\t(-a not required)\n");
53+
fprintf(o, "\nAlgorithms:\n\t");
5254
w = 0;
5355
for (x = 0; hash_descriptor[x].name != NULL; x++) {
5456
w += fprintf(o, "%-14s", hash_descriptor[x].name);
5557
if (w >= 70) {
56-
fprintf(o, "\n");
58+
fprintf(o, "\n\t");
5759
w = 0;
5860
}
5961
}

0 commit comments

Comments
 (0)