diff options
author | mckay <mckay@FreeBSD.org> | 2012-08-17 02:27:17 +0000 |
---|---|---|
committer | mckay <mckay@FreeBSD.org> | 2012-08-17 02:27:17 +0000 |
commit | 3671fbcc9a0b75432bc70c518226f2246097359b (patch) | |
tree | 2819f9b8abe52ece5cd3100f41f3b62e489dfa30 /contrib | |
parent | 3f0806aa1fc8c8dc2f294421d558472faec7fd3f (diff) | |
download | FreeBSD-src-3671fbcc9a0b75432bc70c518226f2246097359b.zip FreeBSD-src-3671fbcc9a0b75432bc70c518226f2246097359b.tar.gz |
Correct a regression introduced during the import of file(1) 5.11.
Magic tests containing "search" or "regex" directives were incorrectly
compiled by "mkmagic" and were effectively ignored. This caused troff
files (for example) to be detected as simply "ASCII text" instead of
as "troff or preprocessor input, ASCII text".
PR: bin/170415
Approved by: consensus on developers@
MFC after: 3 days
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/file/apprentice.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/contrib/file/apprentice.c b/contrib/file/apprentice.c index a9d4d17..8e0f2cf 100644 --- a/contrib/file/apprentice.c +++ b/contrib/file/apprentice.c @@ -648,7 +648,6 @@ set_test_type(struct magic *mstart, struct magic *m) break; case FILE_REGEX: case FILE_SEARCH: -#ifndef COMPILE_ONLY /* Check for override */ if (mstart->str_flags & STRING_BINTEST) mstart->flag |= BINTEST; @@ -664,7 +663,6 @@ set_test_type(struct magic *mstart, struct magic *m) mstart->flag |= BINTEST; else mstart->flag |= TEXTTEST; -#endif break; case FILE_DEFAULT: /* can't deduce anything; we shouldn't see this at the |