diff gfxconv.c @ 432:b583a682f12d

Improve listing of input/output formats in --help.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 03 Nov 2012 13:37:09 +0200
parents e3ebcbc4ace2
children e4a3f183e463
line wrap: on
line diff
--- 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] <input file>");
     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");