]> granicus.if.org Git - file/commitdiff
for indirect formats, allow printing the offset, and default use default
authorChristos Zoulas <christos@zoulas.com>
Fri, 6 Apr 2012 21:14:01 +0000 (21:14 +0000)
committerChristos Zoulas <christos@zoulas.com>
Fri, 6 Apr 2012 21:14:01 +0000 (21:14 +0000)
strength

src/apprentice.c

index 7853642b5481cdd1fb3130a1d392b24465de5dd1..eccf5d074cc0d69acc3801081db77f23f7b776b1 100644 (file)
@@ -32,7 +32,7 @@
 #include "file.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: apprentice.c,v 1.173 2011/12/08 12:38:24 rrt Exp $")
+FILE_RCSID("@(#)$File: apprentice.c,v 1.174 2012/04/03 22:25:07 christos Exp $")
 #endif /* lint */
 
 #include "magic.h"
@@ -212,7 +212,7 @@ static const struct type_tbl_s {
        { XX("ledouble"),       FILE_LEDOUBLE,          FILE_FMT_DOUBLE },
        { XX("leid3"),          FILE_LEID3,             FILE_FMT_NUM },
        { XX("beid3"),          FILE_BEID3,             FILE_FMT_NUM },
-       { XX("indirect"),       FILE_INDIRECT,          FILE_FMT_NONE },
+       { XX("indirect"),       FILE_INDIRECT,          FILE_FMT_NUM },
        { XX("qwdate"),         FILE_QWDATE,            FILE_FMT_STR },
        { XX("leqwdate"),       FILE_LEQWDATE,          FILE_FMT_STR },
        { XX("beqwdate"),       FILE_BEQWDATE,          FILE_FMT_STR },
@@ -477,6 +477,9 @@ apprentice_magic_strength(const struct magic *m)
                val += 8 * MULT;
                break;
 
+       case FILE_INDIRECT:
+               break;
+
        default:
                val = 0;
                (void)fprintf(stderr, "Bad type %d\n", m->type);