From: Christos Zoulas Date: Thu, 15 Mar 2007 14:51:00 +0000 (+0000) Subject: fix fortran and nroff reversed tests (Dmitry V. Levin) X-Git-Tag: FILE5_05~633 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9853c74c887827a026046acb68cbbf8799fc95a2;p=file fix fortran and nroff reversed tests (Dmitry V. Levin) --- diff --git a/src/ascmagic.c b/src/ascmagic.c index 771eda3c..564556dd 100644 --- a/src/ascmagic.c +++ b/src/ascmagic.c @@ -49,7 +49,7 @@ #include "names.h" #ifndef lint -FILE_RCSID("@(#)$File: ascmagic.c,v 1.49 2007/01/25 21:05:46 christos Exp $") +FILE_RCSID("@(#)$File: ascmagic.c,v 1.50 2007/03/15 14:51:00 christos Exp $") #endif /* lint */ typedef unsigned long unichar; @@ -167,7 +167,7 @@ file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes) * I believe Plan 9 troff allows non-ASCII characters in the names * of macros, so this test might possibly fail on such a file. */ - if ((ms->flags & MAGIC_NO_CHECK_TROFF) != 0 && *ubuf == '.') { + if ((ms->flags & MAGIC_NO_CHECK_TROFF) == 0 && *ubuf == '.') { unichar *tp = ubuf + 1; while (ISSPC(*tp)) @@ -184,7 +184,7 @@ file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes) } } - if ((ms->flags & MAGIC_NO_CHECK_FORTRAN) && + if ((ms->flags & MAGIC_NO_CHECK_FORTRAN) == 0 && (*buf == 'c' || *buf == 'C') && ISSPC(buf[1])) { subtype_mime = "text/fortran"; subtype = "fortran program";