# HG changeset patch # User Matti Hamalainen # Date 1351942629 -7200 # Node ID b583a682f12d099607c8a53be9737d4e7e94cc37 # Parent e3ebcbc4ace23b9e7a19f3948fba56f43c0cc024 Improve listing of input/output formats in --help. diff -r e3ebcbc4ace2 -r b583a682f12d gfxconv.c --- a/gfxconv.c Sat Nov 03 13:36:51 2012 +0200 +++ b/gfxconv.c Sat Nov 03 13:37:09 2012 +0200 @@ -162,12 +162,20 @@ dmPrintBanner(stdout, dmProgName, "[options] "); dmArgsPrintHelp(stdout, optList, optListN); - printf("\nAvailable output formats:\n"); + printf("\n" + "Available input/output formats:\n" + " EXT | I | O | Description\n" + "------+---+---+--------------------------------\n" + ); + for (i = 0; i < nconvFormatList; i++) { DMConvFormat *fmt = &convFormatList[i]; - printf("%3d | %-5s | %s\n", - i, fmt->fext ? fmt->fext : "", fmt->name); + printf("%-5s | %c | %c | %s\n", + fmt->fext ? fmt->fext : "", + fmt->in ? 'X' : ' ', + fmt->out ? 'X' : ' ', + fmt->name); } printf("\nAvailable bitmap formats:\n");