summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2006-06-08 22:48:51 +0000
committerChristos Zoulas <christos@zoulas.com>2006-06-08 22:48:51 +0000
commite53bbc393119620e0f7644e21f87718808f06334 (patch)
tree90fc128a8f323bb4435a4014dc513006ca246759 /src/print.c
parent74805a9f80d0a7af6b872806f15b526936f8528c (diff)
downloadfile-git-e53bbc393119620e0f7644e21f87718808f06334.tar.gz
more quad format fixes.
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/print.c b/src/print.c
index 9230895b..89286713 100644
--- a/src/print.c
+++ b/src/print.c
@@ -41,7 +41,7 @@
#include <time.h>
#ifndef lint
-FILE_RCSID("@(#)$Id: print.c,v 1.51 2006/06/08 20:53:51 christos Exp $")
+FILE_RCSID("@(#)$Id: print.c,v 1.52 2006/06/08 22:48:51 christos Exp $")
#endif /* lint */
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
@@ -50,8 +50,9 @@ FILE_RCSID("@(#)$Id: print.c,v 1.51 2006/06/08 20:53:51 christos Exp $")
protected void
file_mdump(struct magic *m)
{
- private const char *typ[] = { FILE_FORMAT_NAME };
private const char optyp[] = { FILE_OPS };
+ extern const char *file_names[];
+ extern const int file_nnames;
(void) fputc('[', stderr);
(void) fprintf(stderr, ">>>>>>>> %d" + 8 - (m->cont_level & 7),
@@ -60,8 +61,8 @@ file_mdump(struct magic *m)
if (m->flag & INDIR) {
(void) fprintf(stderr, "(%s,",
/* Note: type is unsigned */
- (m->in_type < SZOF(typ)) ?
- typ[m->in_type] : "*bad*");
+ (m->in_type < file_nnames) ?
+ file_names[m->in_type] : "*bad*");
if (m->in_op & FILE_OPINVERSE)
(void) fputc('~', stderr);
(void) fprintf(stderr, "%c%d),",
@@ -71,7 +72,7 @@ file_mdump(struct magic *m)
}
(void) fprintf(stderr, " %s%s", (m->flag & UNSIGNED) ? "u" : "",
/* Note: type is unsigned */
- (m->type < SZOF(typ)) ? typ[m->type] : "*bad*");
+ (m->type < file_nnames) ? file_names[m->type] : "*bad*");
if (m->mask_op & FILE_OPINVERSE)
(void) fputc('~', stderr);
if (m->mask) {