From: Christos Zoulas Date: Tue, 8 Feb 2011 13:45:15 +0000 (+0000) Subject: increase range of latex patterns and strength over python ones because X-Git-Tag: FILE5_06~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b3967f458228a87d15901926642795abf6eea35;p=file increase range of latex patterns and strength over python ones because there is latex inside python but not python inside latex. From Jan Kaluza. --- diff --git a/magic/Magdir/python b/magic/Magdir/python index 8aa12736..c719f383 100644 --- a/magic/Magdir/python +++ b/magic/Magdir/python @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: python,v 1.16 2010/12/31 18:15:28 christos Exp $ +# $File: python,v 1.17 2011/02/08 13:45:15 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 6ac44892..e8d2e876 100644 --- a/magic/Magdir/tex +++ b/magic/Magdir/tex @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: tex,v 1.17 2010/09/20 19:19:17 rrt Exp $ +# $File: tex,v 1.18 2011/02/08 13:45:15 christos 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