Mercurial > hg > sidinfo
comparison sidinfo.c @ 329:14a91c998d96
Adjust help output cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 12 Jan 2020 20:26:45 +0200 |
parents | 04ed43ef97e7 |
children | c8f52ea74803 |
comparison
equal
deleted
inserted
replaced
328:04ed43ef97e7 | 329:14a91c998d96 |
---|---|
142 void argShowHelp(void) | 142 void argShowHelp(void) |
143 { | 143 { |
144 int index, len; | 144 int index, len; |
145 | 145 |
146 th_print_banner(stdout, th_prog_name, "[options] <sid file|path> [file|path #2 ..]"); | 146 th_print_banner(stdout, th_prog_name, "[options] <sid file|path> [file|path #2 ..]"); |
147 th_args_help(stdout, optList, optListN, 0); | 147 th_args_help(stdout, optList, optListN, 0, 80 - 2); |
148 | |
148 printf( | 149 printf( |
149 "\n" | 150 "\n" |
150 "Available fields:\n"); | 151 "Available fields:\n"); |
151 | 152 |
152 for (len = index = 0; index < noptPSOptions; index++) | 153 for (len = index = 0; index < noptPSOptions; index++) |
153 { | 154 { |
154 const PSFOption *opt = &optPSOptions[index]; | 155 const PSFOption *opt = &optPSOptions[index]; |
155 len += strlen(opt->name) + 3; | 156 len += strlen(opt->name) + 2; |
156 if (len >= 72) | 157 if (len >= 80 - 2) |
157 { | 158 { |
158 printf("\n"); | 159 printf("\n"); |
159 len = 0; | 160 len = 0; |
160 } | 161 } |
161 printf("%s%s", opt->name, (index < noptPSOptions - 1) ? ", " : "\n\n"); | 162 printf("%s%s", opt->name, (index < noptPSOptions - 1) ? ", " : "\n\n"); |