usage: fix horizontal alignment of options
When showing the command usage information for vpxenc and vpxdec,
options with both a short and long version that do not take an
argument were not properly aligned.
Change-Id: I8d65b5ab85bcb5a5dc8bc0d4b293b5189d56dedb
diff --git a/args.c b/args.c
index 5365e91..7829290 100644
--- a/args.c
+++ b/args.c
@@ -120,9 +120,13 @@
char *long_val = def->has_val ? "=<arg>" : "";
if (def->short_name && def->long_name)
- snprintf(option_text, 37, "-%s%s, --%s%s",
- def->short_name, short_val,
+ {
+ char *comma = def->has_val ? "," : ", ";
+
+ snprintf(option_text, 37, "-%s%s%s --%s%6s",
+ def->short_name, short_val, comma,
def->long_name, long_val);
+ }
else if (def->short_name)
snprintf(option_text, 37, "-%s%s",
def->short_name, short_val);