From: Christos Zoulas Date: Mon, 29 Oct 2007 00:54:07 +0000 (+0000) Subject: convert fortran to a soft test (from rrt). X-Git-Tag: FILE5_05~576 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52db1d7e26e2f5d7acf74119ddf62b66ea021379;p=file convert fortran to a soft test (from rrt). --- diff --git a/ChangeLog b/ChangeLog index ced051b9..e9f7d985 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-28 20:48 Christos Zoulas + + * Convert fortran to a soft test (Reuben Thomas) + 2007-10-23 5:25 Christos Zoulas * Add --with-filename, and --no-filename (Reuben Thomas) diff --git a/magic/Magdir/fortran b/magic/Magdir/fortran new file mode 100644 index 00000000..ce004adb --- /dev/null +++ b/magic/Magdir/fortran @@ -0,0 +1,2 @@ +# FORTRAN source +0 string/c c\ FORTRAN program diff --git a/magic/Makefile.am b/magic/Makefile.am index c7059c56..bc5e002a 100644 --- a/magic/Makefile.am +++ b/magic/Makefile.am @@ -85,6 +85,7 @@ Magdir/fcs \ Magdir/filesystems \ Magdir/flash \ Magdir/fonts \ +Magdir/fortran \ Magdir/frame \ Magdir/freebsd \ Magdir/fsav \ diff --git a/magic/magic.mime b/magic/magic.mime index 9f70fab1..8e558aec 100644 --- a/magic/magic.mime +++ b/magic/magic.mime @@ -960,3 +960,5 @@ # 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 diff --git a/src/ascmagic.c b/src/ascmagic.c index 92c83a26..8d2d9a76 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.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) diff --git a/src/file.c b/src/file.c index 04e0d787..fa2ce56e 100644 --- a/src/file.c +++ b/src/file.c @@ -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 }, diff --git a/src/magic.h b/src/magic.h index 96aa2f68..6041f548 100644 --- a/src/magic.h +++ b/src/magic.h @@ -49,9 +49,11 @@ #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 diff --git a/src/names.h b/src/names.h index f06be17f..28ec67a7 100644 --- a/src/names.h +++ b/src/names.h @@ -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" },