Add support for describing the options in the C programs.

This commit is contained in:
Mike Frysinger
2007-09-25 16:21:38 +00:00
parent 17f430c0b9
commit 284286004e
12 changed files with 99 additions and 7 deletions

View File

@@ -16,7 +16,8 @@ static void usage (int exit_status)
#endif
printf ("\n\nOptions: [" getoptstring "]\n");
for (i = 0; longopts[i].name; ++i)
printf (" -%c, --%s\n", longopts[i].val, longopts[i].name);
printf (" -%c, --%-15s %s\n", longopts[i].val, longopts[i].name,
longopts_help[i]);
exit (exit_status);
}