diff tools/gfxconv.c @ 2242:65a2c2e99c81

Move listing of C64 formats function to argShowC64Formats in lib64util.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 15 Jun 2019 07:55:26 +0300
parents 26f1bae40fb6
children fe974f670d1d
line wrap: on
line diff
--- a/tools/gfxconv.c	Sat Jun 15 07:54:39 2019 +0300
+++ b/tools/gfxconv.c	Sat Jun 15 07:55:26 2019 +0300
@@ -206,24 +206,9 @@
     "\n"
     "(Not all input->output combinations are actually supported.)\n"
     "\n"
-    "Available C64 bitmap formats (-f <frmt>):\n"
-    " frmt | RW | Type            | Description\n"
-    "------+----+-----------------+-------------------------------------\n"
     );
 
-    for (int i = 0; i < ndmC64ImageFormats; i++)
-    {
-        const DMC64ImageFormat *fmt = dmC64ImageFormatsSorted[i];
-        char buf[64];
-        printf("%-6s| %c%c | %-15s | %s%s\n",
-            fmt->fext,
-            (fmt->flags & DM_FMT_RD) ? 'R' : ' ',
-            (fmt->flags & DM_FMT_WR) ? 'W' : ' ',
-            dmC64GetImageTypeString(buf, sizeof(buf), fmt->format->type, FALSE),
-            fmt->name,
-            fmt->flags & DM_FMT_BROKEN ? " [BROKEN]" : "");
-    }
-    printf("%d formats supported.\n", ndmC64ImageFormats);
+    argShowC64Formats(stdout, TRUE);
 }