diff options
author | Christos Zoulas <christos@zoulas.com> | 2007-11-08 00:31:37 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2007-11-08 00:31:37 +0000 |
commit | 41b716d047cc61522770090157ca207dbcade41e (patch) | |
tree | a49e0d03bb652a275a01c051adcb45f92938538c /src/print.c | |
parent | e0d26fb3276d881211945647dc6e6192da52dba8 (diff) | |
download | file-git-41b716d047cc61522770090157ca207dbcade41e.tar.gz |
float and double formats from behanw@websterwood.com (Behan Webster)
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c index d1d1ec10..d41bb739 100644 --- a/src/print.c +++ b/src/print.c @@ -41,7 +41,7 @@ #include <time.h> #ifndef lint -FILE_RCSID("@(#)$File: print.c,v 1.59 2007/03/05 02:41:29 christos Exp $") +FILE_RCSID("@(#)$File: print.c,v 1.60 2007/11/08 00:31:37 christos Exp $") #endif /* lint */ #define SZOF(a) (sizeof(a) / sizeof(a[0])) @@ -157,6 +157,16 @@ file_mdump(struct magic *m) (void)fprintf(stderr, "%s,", file_fmttime((uint32_t)m->value.q, 0)); break; + case FILE_FLOAT: + case FILE_BEFLOAT: + case FILE_LEFLOAT: + (void) fprintf(stderr, "%G", m->value.f); + break; + case FILE_DOUBLE: + case FILE_BEDOUBLE: + case FILE_LEDOUBLE: + (void) fprintf(stderr, "%G", m->value.d); + break; case FILE_DEFAULT: /* XXX - do anything here? */ break; |