]> granicus.if.org Git - file/commitdiff
convert fortran to a soft test (from rrt).
authorChristos Zoulas <christos@zoulas.com>
Mon, 29 Oct 2007 00:54:07 +0000 (00:54 +0000)
committerChristos Zoulas <christos@zoulas.com>
Mon, 29 Oct 2007 00:54:07 +0000 (00:54 +0000)
ChangeLog
magic/Magdir/fortran [new file with mode: 0644]
magic/Makefile.am
magic/magic.mime
src/ascmagic.c
src/file.c
src/magic.h
src/names.h

index ced051b916f1a38fa6040a9dc500a15b3ac0d0c8..e9f7d985021d53c92313a5109cd295933227a447 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-10-28 20:48 Christos Zoulas <christos@zoulas.com>
+
+       * Convert fortran to a soft test (Reuben Thomas)
+
 2007-10-23  5:25 Christos Zoulas <christos@zoulas.com>
 
        * Add --with-filename, and --no-filename (Reuben Thomas)
diff --git a/magic/Magdir/fortran b/magic/Magdir/fortran
new file mode 100644 (file)
index 0000000..ce004ad
--- /dev/null
@@ -0,0 +1,2 @@
+# FORTRAN source
+0      string/c        c\              FORTRAN program
index c7059c56a5730f8398ed16efba5fcb5720d0b2b3..bc5e002a3750c665a2276db8b5feee61e6503e38 100644 (file)
@@ -85,6 +85,7 @@ Magdir/fcs \
 Magdir/filesystems \
 Magdir/flash \
 Magdir/fonts \
+Magdir/fortran \
 Magdir/frame \
 Magdir/freebsd \
 Magdir/fsav \
index 9f70fab1d075a582ac0256f193337ff6e7b06519..8e558aecb7274e6300da7d3cb34a5a52e9ddf3ca 100644 (file)
 # Symbian installation files
 8      lelong  0x10000419      application/vnd.symbian.install
 0      lelong  0x10201A7A      x-epoc/x-sisx-app
+# FORTRAN source
+0      string/c        c\              text/x-fortran
index 92c83a26705954297784b8767b96a61c7fd2b72e..8d2d9a763c50eba08f0442778ec270e086225a8c 100644 (file)
@@ -49,7 +49,7 @@
 #include "names.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: ascmagic.c,v 1.52 2007/10/17 19:33:31 christos Exp $")
+FILE_RCSID("@(#)$File: ascmagic.c,v 1.53 2007/10/29 00:54:08 christos Exp $")
 #endif /* lint */
 
 typedef unsigned long unichar;
@@ -185,13 +185,6 @@ file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes)
                }
        }
 
-       if ((ms->flags & MAGIC_NO_CHECK_FORTRAN) == 0 &&
-           (*buf == 'c' || *buf == 'C') && ISSPC(buf[1])) {
-               subtype_mime = "text/fortran";
-               subtype = "fortran program";
-               goto subtype_identified;
-       }
-
        /* look for tokens from names.h - this is expensive! */
 
        if ((ms->flags & MAGIC_NO_CHECK_TOKENS) != 0)
index 04e0d78700bc29ad654851330e0e2ec15612edb5..fa2ce56e14275ee59f7a6737b4f41ce1865f0d81 100644 (file)
@@ -71,7 +71,7 @@
 #include "patchlevel.h"
 
 #ifndef        lint
-FILE_RCSID("@(#)$File: file.c,v 1.115 2007/10/25 15:33:17 christos Exp $")
+FILE_RCSID("@(#)$File: file.c,v 1.116 2007/10/29 00:54:08 christos Exp $")
 #endif /* lint */
 
 
@@ -152,7 +152,6 @@ main(int argc, char *argv[])
                { "ascii",      MAGIC_NO_CHECK_ASCII },
                { "compress",   MAGIC_NO_CHECK_COMPRESS },
                { "elf",        MAGIC_NO_CHECK_ELF },
-               { "fortran",    MAGIC_NO_CHECK_FORTRAN },
                { "soft",       MAGIC_NO_CHECK_SOFT },
                { "tar",        MAGIC_NO_CHECK_TAR },
                { "tokens",     MAGIC_NO_CHECK_TOKENS },
index 96aa2f68ced0966432738cba16eb03c3b3707ea1..6041f548c8f96278ae0c4cc61e91cc0a2f7d3240 100644 (file)
 #define        MAGIC_NO_CHECK_ELF      0x010000 /* Don't check for elf details */
 #define        MAGIC_NO_CHECK_ASCII    0x020000 /* Don't check for ascii files */
 #define        MAGIC_NO_CHECK_TROFF    0x040000 /* Don't check ascii/troff */
-#define        MAGIC_NO_CHECK_FORTRAN  0x080000 /* Don't check ascii/fortran */
 #define        MAGIC_NO_CHECK_TOKENS   0x100000 /* Don't check ascii/tokens */
 
+/* Defined for backwards compatibility; does nothing */
+#define        MAGIC_NO_CHECK_FORTRAN  0x000000 /* Don't check ascii/fortran */
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index f06be17fb05645059e263cb5460e51bc56068721..28ec67a7a60af16be790208b5c38ec2dada0774a 100644 (file)
@@ -32,7 +32,7 @@
  * appear at fixed offsets into the file. Don't make HOWMANY
  * too high unless you have a very fast CPU.
  *
- * $File: names.h,v 1.27 2007/05/08 16:47:03 christos Exp $
+ * $File: names.h,v 1.28 2007/10/29 00:54:08 christos Exp $
  */
 
 /*
@@ -63,7 +63,6 @@ static const struct {
 } types[] = {
        { "C program",                                  "text/x-c", },
        { "C++ program",                                "text/x-c++" },
-       { "FORTRAN program",                            "text/x-fortran" },
        { "make commands",                              "text/x-makefile" },
        { "PL/1 program",                               "text/x-pl1" },
        { "assembler program",                          "text/x-asm" },