]> granicus.if.org Git - file/commitdiff
use the constant arrays from the header install of hand-rolling them.
authorChristos Zoulas <christos@zoulas.com>
Wed, 12 Oct 2005 19:29:42 +0000 (19:29 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 12 Oct 2005 19:29:42 +0000 (19:29 +0000)
src/print.c

index a6ed790f9ccb8f67217786b025f956fd43c83614..97c743c3aa0d6cd6825faee9ad70d70fa1540e5a 100644 (file)
@@ -41,7 +41,7 @@
 #include <time.h>
 
 #ifndef lint
-FILE_RCSID("@(#)$Id: print.c,v 1.47 2005/03/14 16:56:25 christos Exp $")
+FILE_RCSID("@(#)$Id: print.c,v 1.48 2005/10/12 19:29:42 christos Exp $")
 #endif  /* lint */
 
 #define SZOF(a)        (sizeof(a) / sizeof(a[0]))
@@ -50,13 +50,9 @@ FILE_RCSID("@(#)$Id: print.c,v 1.47 2005/03/14 16:56:25 christos Exp $")
 protected void
 file_mdump(struct magic *m)
 {
-       private const char *typ[] = { "invalid", "byte", "short", "invalid",
-                                    "long", "string", "date", "beshort",
-                                    "belong", "bedate", "leshort", "lelong",
-                                    "ledate", "pstring", "ldate", "beldate",
-                                    "leldate", "regex" };
-       private const char optyp[] = { '@', '&', '|', '^', '+', '-', 
-                                     '*', '/', '%' };
+       private const char *typ[] = { FILE_FORMAT_NAME };
+       private const char optyp[] = { FILE_OPS };
+
        (void) fputc('[', stderr);
        (void) fprintf(stderr, ">>>>>>>> %d" + 8 - (m->cont_level & 7),
                       m->offset);