fix fortran and nroff reversed tests (Dmitry V. Levin)
authorChristos Zoulas <christos@zoulas.com>
Thu, 15 Mar 2007 14:51:00 +0000 (14:51 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 15 Mar 2007 14:51:00 +0000 (14:51 +0000)
src/ascmagic.c

index 961febd4c137ca8c1d8f347d17e58bb3a3f2f730..441b5020a78021e2b8b7adc351d35f2b81b57542 100644 (file)
@@ -49,7 +49,7 @@
 #include "names.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: ascmagic.c,v 1.48 2007/01/16 14:56:45 ljt Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.49 2007/01/25 21:05:46 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";