Skip to content

Commit

Permalink
output the list of components correctly in the help output
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Apr 18, 2024
1 parent 18b2274 commit 8e54011
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions trurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ typedef enum {
#define OUTPUT_FRAGMENT 9
#define OUTPUT_ZONEID 10

#define NUM_COMPONENTS 11 /* including "url" */
#define NUM_COMPONENTS 10 /* excluding "url" */

#define PROGNAME "trurl"

Expand Down Expand Up @@ -204,7 +204,8 @@ static void help(void)
" --quiet - Suppress (some) notes and comments\n"
" URL COMPONENTS:\n"
" ", stdout);
for(i = 0; i< NUM_COMPONENTS; i++) {
fputs("url, ", stdout);
for(i = 0; i< NUM_COMPONENTS ; i++) {
printf("%s%s", i?", ":"", variables[i].name);
}
fputs("\n", stdout);
Expand Down

0 comments on commit 8e54011

Please sign in to comment.