From aed20ff05cc20df22fe14ee3f3420477edc428f9 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Tue, 8 Feb 2011 13:45:15 +0000 Subject: [PATCH] increase range of latex patterns and strength over python ones because there is latex inside python but not python inside latex. From Jan Kaluza. --- magic/Magdir/python | 4 ++-- magic/Magdir/tex | 38 +++++++++++++++++++++++--------------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/magic/Magdir/python b/magic/Magdir/python index 51edbad0..107b0917 100644 --- a/magic/Magdir/python +++ b/magic/Magdir/python @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: python,v 1.15 2010/12/07 16:52:52 christos Exp $ +# $File: python,v 1.16 2010/12/31 18:15:28 christos Exp $ # python: file(1) magic for python # # From: David Necas @@ -32,7 +32,7 @@ # from module.submodule import func1, func2 -0 regex/b \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable +0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable !:mime text/x-python # def __init__ (self, ...): diff --git a/magic/Magdir/tex b/magic/Magdir/tex index 161a24ec..fa531f26 100644 --- a/magic/Magdir/tex +++ b/magic/Magdir/tex @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: tex,v 1.16 2009/09/19 16:28:12 christos Exp $ +# $File: tex,v 1.17 2010/09/20 19:19:17 rrt Exp $ # tex: file(1) magic for TeX files # # XXX - needs byte-endian stuff (big-endian and little-endian DVI?) @@ -37,34 +37,42 @@ !:mime text/x-info # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com) -0 search/400 \\input TeX document text +0 search/4096 \\input TeX document text !:mime text/x-tex -0 search/400 \\section LaTeX document text +!:strength + 15 +0 search/4096 \\section LaTeX document text !:mime text/x-tex -0 search/400 \\setlength LaTeX document text +!:strength + 18 +0 search/4096 \\setlength LaTeX document text !:mime text/x-tex -0 search/400 \\documentstyle LaTeX document text +!:strength + 15 +0 search/4096 \\documentstyle LaTeX document text !:mime text/x-tex -0 search/400 \\chapter LaTeX document text +!:strength + 18 +0 search/4096 \\chapter LaTeX document text !:mime text/x-tex -0 search/400 \\documentclass LaTeX 2e document text +!:strength + 18 +0 search/4096 \\documentclass LaTeX 2e document text !:mime text/x-tex -0 search/400 \\relax LaTeX auxiliary file +!:strength + 15 +0 search/4096 \\relax LaTeX auxiliary file !:mime text/x-tex -0 search/400 \\contentsline LaTeX table of contents +!:strength + 15 +0 search/4096 \\contentsline LaTeX table of contents !:mime text/x-tex -0 search/400 %\ -*-latex-*- LaTeX document text +!:strength + 15 +0 search/4096 %\ -*-latex-*- LaTeX document text !:mime text/x-tex # Tex document, from Hendrik Scholz 0 search/1 \\ifx TeX document text # Index and glossary files -0 search/400 \\indexentry LaTeX raw index file -0 search/400 \\begin{theindex} LaTeX sorted index -0 search/400 \\glossaryentry LaTeX raw glossary -0 search/400 \\begin{theglossary} LaTeX sorted glossary -0 search/400 This\ is\ makeindex Makeindex log file +0 search/4096 \\indexentry LaTeX raw index file +0 search/4096 \\begin{theindex} LaTeX sorted index +0 search/4096 \\glossaryentry LaTeX raw glossary +0 search/4096 \\begin{theglossary} LaTeX sorted glossary +0 search/4096 This\ is\ makeindex Makeindex log file # End of TeX -- 2.40.0