Skip to content

Commit

Permalink
Update --help option output
Browse files Browse the repository at this point in the history
  • Loading branch information
nickolasburr committed Jul 17, 2018
1 parent 1154516 commit 48385be
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/argv.c
Expand Up @@ -24,20 +24,13 @@ static option_t options[] = {
*/
void usage (void) {
int index;
char fvalue[36];

fprintf(stdout, "Usage: rng [OPTIONS]\n\n");
fprintf(stdout, "Usage: rng [OPTIONS] <START>,[<END>] [FILE]\n\n");
fprintf(stdout, "OPTIONS:\n\n");

for (index = 0; index < NUM_OPTIONS; index += 1) {
option_t *option = &options[index];

/**
* Format option->value string.
*/
copy(fvalue, option->value);
concat(fvalue, ",");

fprintf(stdout, "%4s%-22s %s: %-24s\n", "", fvalue, option->alias, option->desc);
fprintf(stdout, "%4s%s, %s: %-24s\n", "", option->alias, option->value, option->desc);
}
}

0 comments on commit 48385be

Please sign in to comment.