]> granicus.if.org Git - file/commitdiff
print some of the new formats
authorChristos Zoulas <christos@zoulas.com>
Thu, 2 Mar 2006 22:07:53 +0000 (22:07 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 2 Mar 2006 22:07:53 +0000 (22:07 +0000)
src/print.c

index 11e3b6c968ed72f1ab9dfae30b3fbedb8b5f0108..e7c8098d699e11070081971b2f9dfa70338d3358 100644 (file)
@@ -41,7 +41,7 @@
 #include <time.h>
 
 #ifndef lint
-FILE_RCSID("@(#)$Id: print.c,v 1.49 2005/10/20 14:59:01 christos Exp $")
+FILE_RCSID("@(#)$Id: print.c,v 1.50 2006/03/02 22:07:53 christos Exp $")
 #endif  /* lint */
 
 #define SZOF(a)        (sizeof(a) / sizeof(a[0]))
@@ -79,7 +79,7 @@ file_mdump(struct magic *m)
                        fputc(optyp[m->mask_op&0x7F], stderr);
                else
                        fputc('?', stderr);
-               if(FILE_STRING != m->type || FILE_PSTRING != m->type)
+               if (FILE_STRING != m->type || FILE_PSTRING != m->type)
                        (void) fprintf(stderr, "%.8x", m->mask);
                else {
                        if (m->mask & STRING_IGNORE_LOWERCASE) 
@@ -106,10 +106,13 @@ file_mdump(struct magic *m)
                case FILE_BELONG:
                        (void) fprintf(stderr, "%d", m->value.l);
                        break;
-               case FILE_STRING:
                case FILE_PSTRING:
+               case FILE_STRING:
                case FILE_REGEX:
-                       file_showstr(stderr, m->value.s, ~0U);
+               case FILE_BESTRING16:
+               case FILE_LESTRING16:
+               case FILE_SEARCH:
+                       file_showstr(stderr, m->value.s, m->vallen);
                        break;
                case FILE_DATE:
                case FILE_LEDATE: