diff options
author | obrien <obrien@FreeBSD.org> | 2012-04-13 23:30:38 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2012-04-13 23:30:38 +0000 |
commit | 15f98df7891f1853090ecb6c4a9cc734e671ef6b (patch) | |
tree | 76d27a13085cbcecae404c91dc1a6e03fc5c5d7b /print.c | |
parent | 75c49f9dd6a0ff710f7c791a485899c7a07af444 (diff) | |
download | FreeBSD-src-15f98df7891f1853090ecb6c4a9cc734e671ef6b.zip FreeBSD-src-15f98df7891f1853090ecb6c4a9cc734e671ef6b.tar.gz |
Virgin import of Christos Zoulas's FILE 5.11.
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: print.c,v 1.70 2011/08/14 09:03:12 christos Exp $") +FILE_RCSID("@(#)$File: print.c,v 1.71 2011/09/20 15:28:09 christos Exp $") #endif /* lint */ #include <string.h> @@ -51,8 +51,8 @@ file_mdump(struct magic *m) { private const char optyp[] = { FILE_OPS }; - (void) fprintf(stderr, "%.*s %u", (m->cont_level & 7) + 1, ">>>>>>>>", - m->offset); + (void) fprintf(stderr, "%u: %.*s %u", m->lineno, + (m->cont_level & 7) + 1, ">>>>>>>>", m->offset); if (m->flag & INDIR) { (void) fprintf(stderr, "(%s,", @@ -87,6 +87,24 @@ file_mdump(struct magic *m) (void) fputc(CHAR_IGNORE_UPPERCASE, stderr); if (m->str_flags & REGEX_OFFSET_START) (void) fputc(CHAR_REGEX_OFFSET_START, stderr); + if (m->str_flags & STRING_TEXTTEST) + (void) fputc(CHAR_TEXTTEST, stderr); + if (m->str_flags & STRING_BINTEST) + (void) fputc(CHAR_BINTEST, stderr); + if (m->str_flags & PSTRING_1_BE) + (void) fputc(CHAR_PSTRING_1_BE, stderr); + if (m->str_flags & PSTRING_2_BE) + (void) fputc(CHAR_PSTRING_2_BE, stderr); + if (m->str_flags & PSTRING_2_LE) + (void) fputc(CHAR_PSTRING_2_LE, stderr); + if (m->str_flags & PSTRING_4_BE) + (void) fputc(CHAR_PSTRING_4_BE, stderr); + if (m->str_flags & PSTRING_4_LE) + (void) fputc(CHAR_PSTRING_4_LE, stderr); + if (m->str_flags & PSTRING_LENGTH_INCLUDES_ITSELF) + (void) fputc( + CHAR_PSTRING_LENGTH_INCLUDES_ITSELF, + stderr); } if (m->str_range) (void) fprintf(stderr, "/%u", m->str_range); |