Commit dea6193d authored by John Koleszar's avatar John Koleszar
Browse files

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
parent 28f177cd
......@@ -120,9 +120,13 @@ void arg_show_usage(FILE *fp, const struct arg_def *const *defs)
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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment