clearer code
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2454 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -82,15 +82,14 @@ arg_printusage (struct getargs *args,
|
|||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
if (args[i].long_name) {
|
if (args[i].long_name) {
|
||||||
len += 2 + strlen(args[i].long_name);
|
fprintf (stderr, " [--");
|
||||||
fprintf (stderr,
|
if (args[i].type == arg_negative_flag) {
|
||||||
" [--%s%s",
|
fprintf (stderr, "no-");
|
||||||
args[i].type == arg_negative_flag ?
|
|
||||||
"no-" : "",
|
|
||||||
args[i].long_name);
|
|
||||||
len += print_arg (1, &args[i]);
|
|
||||||
if (args[i].type == arg_negative_flag)
|
|
||||||
len += 3;
|
len += 3;
|
||||||
|
}
|
||||||
|
fprintf (stderr, "%s", args[i].long_name);
|
||||||
|
len += 2 + strlen(args[i].long_name);
|
||||||
|
len += print_arg (1, &args[i]);
|
||||||
putc (']', stderr);
|
putc (']', stderr);
|
||||||
}
|
}
|
||||||
if (args[i].short_name) {
|
if (args[i].short_name) {
|
||||||
@@ -121,13 +120,13 @@ arg_printusage (struct getargs *args,
|
|||||||
count += 4;
|
count += 4;
|
||||||
}
|
}
|
||||||
if (args[i].long_name) {
|
if (args[i].long_name) {
|
||||||
fprintf (stderr, "--%s%s",
|
fprintf (stderr, "--");
|
||||||
args[i].type == arg_negative_flag ?
|
if (args[i].type == arg_negative_flag) {
|
||||||
"no-" : "",
|
fprintf (stderr, "no-");
|
||||||
args[i].long_name);
|
|
||||||
count += 2 + strlen(args[i].long_name);
|
|
||||||
if (args[i].type == arg_negative_flag)
|
|
||||||
count += 3;
|
count += 3;
|
||||||
|
}
|
||||||
|
fprintf (stderr, "%s", args[i].long_name);
|
||||||
|
count += 2 + strlen(args[i].long_name);
|
||||||
count += print_arg (1, &args[i]);
|
count += print_arg (1, &args[i]);
|
||||||
}
|
}
|
||||||
while(count++ <= max_len)
|
while(count++ <= max_len)
|
||||||
|
Reference in New Issue
Block a user