From: Christos Zoulas Date: Wed, 12 Oct 2005 19:29:42 +0000 (+0000) Subject: use the constant arrays from the header install of hand-rolling them. X-Git-Tag: FILE4_16~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8cda207d17fa9de45c7e711488538c1dd203d618;p=file use the constant arrays from the header install of hand-rolling them. --- diff --git a/src/print.c b/src/print.c index a6ed790f..97c743c3 100644 --- a/src/print.c +++ b/src/print.c @@ -41,7 +41,7 @@ #include #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);