fcount

count files in a directory
git clone git://z3bra.org/fcount
Log | Files | Refs | README | LICENSE

commit 662b707caa205973f8c2c7d2dc73940f01719622
parent a2774c6216c33c181a8a8a5d496ddf2cdde1dc57
Author: z3bra <willy@mailoo.org>
Date:   Mon May 12 19:32:37 2014

Display help message with correct binary name

Diffstat:
 fcount.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fcount.c b/fcount.c @@ -21,9 +21,9 @@ #define DEFAULT_DIRECTORY "." -void usage () +void usage (char *binary) { - fputs("mcount [-h] <directory>", stdout); + fprintf(stdout, "%s [-h] <directory>\n", binary); } int main(int argc, char **argv) @@ -35,7 +35,7 @@ int main(int argc, char **argv) if (argc > 1) { if ( !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")) { - usage(); + usage(argv[0]); return 1; } strncpy(directory, argv[1], 255);