Tags: patch

Forgot to attach the patch.

-- Giovanni

On Wed, Feb 10, 2010 at 12:19 PM, Giovanni Funchal <[email protected]> wrote:
> Package: file
> Version: 4.26-1
> Severity: normal
>
>
> If a LaTeX file uses the command \bibligraphystyle somewhere
> in the beginning, file will return mime "text/vnd.graphviz"
> instead of "text/x-tex". I took a look at /usr/share/file/magic
> (on Lenny), and it has something like :
>
> regex/100 [\r\n\t\ ]*graph[\r\n\t\ ]*.*\\{
>
> This regular expression matches \biblioGRAPHystyle in the first
> thousand characters or so.
>
> The proposed patch uses the fact that, in the dot file format used
> by Graphviz[1], the keyword "graph" must be preceded by a white
> space or be in the beginning of the file.
>
> -- System Information:
> Debian Release: 5.0.4
>  APT prefers stable
>  APT policy: (500, 'stable')
> Architecture: i386 (i686)
>
> Kernel: Linux 2.6.30.5-686 (SMP w/1 CPU core; PREEMPT)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/bash
>
> Versions of packages file depends on:
> ii  libc6                  2.7-18lenny2      GNU C Library: Shared libraries
> ii  libmagic1              4.26-1            File type determination library 
> us
> ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime
>
> file recommends no packages.
>
> file suggests no packages.
>
> -- no debconf information
>
>
>
--- /usr/share/file/magic	2008-09-08 14:05:16.000000000 +0200
+++ /home/funchal/Desktop/magic	2010-02-10 13:03:39.000000000 +0100
@@ -7073,9 +7073,9 @@
 
 #------------------------------------------------------------------------------
 # graphviz:  file(1) magic for http://www.graphviz.org/
-0	regex/100	[\r\n\t\ ]*graph[\r\n\t\ ]*.*\\{	graphviz graph text
+0	regex/100	(^|[\r\n\t\ ]+)graph[\r\n\t\ ]*.*\\{	graphviz graph text
 !:mime	text/vnd.graphviz
-0	regex/100	[\r\n\t\ ]*digraph[\r\n\t\ ]*.*\\{	graphviz digraph text
+0	regex/100	(^|[\r\n\t\ ]+)digraph[\r\n\t\ ]*.*\\{	graphviz digraph text
 !:mime	text/vnd.graphviz
 
 #------------------------------------------------------------------------------

Reply via email to