diff options
Diffstat (limited to 'src/commands/printf.c')
-rw-r--r-- | src/commands/printf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commands/printf.c b/src/commands/printf.c index 2a84b80..fd08aa8 100644 --- a/src/commands/printf.c +++ b/src/commands/printf.c @@ -78,10 +78,9 @@ static void handle_slash(char n) { } } -static void help() { +static void help(void) { printf("Usage printf FORMAT [ARG]...\n\n"); printf("Format and print ARG(s) according to FORMAT (a-la C prinf)\n"); - exit(EXIT_SUCCESS); } COMMAND(print) { @@ -89,7 +88,7 @@ COMMAND(print) { error("usage: printf FORMAT [ARG]...\n"); } - if (streql("--help", argv[0])) help(); + parse_help(argc, argv, help); size_t index = 0; int arg_index = 0; |