diff options
Diffstat (limited to 'ext/fileinfo/magicdata.patch')
-rw-r--r-- | ext/fileinfo/magicdata.patch | 62 |
1 files changed, 53 insertions, 9 deletions
diff --git a/ext/fileinfo/magicdata.patch b/ext/fileinfo/magicdata.patch index 26d3bbb656..12fbd3ff56 100644 --- a/ext/fileinfo/magicdata.patch +++ b/ext/fileinfo/magicdata.patch @@ -1,4 +1,4 @@ -Patches applied to file sources tree before generating magic.mgc +Patches applied to file 5.14 sources tree before generating magic.mgc and before running create_data_file.php to create data_file.c. @@ -17,14 +17,6 @@ diff --git a/magic/Magdir/commands b/magic/Magdir/commands index 67c3eee..4a7d8dd 100644 --- a/magic/Magdir/commands +++ b/magic/Magdir/commands -@@ -1,6 +1,6 @@ - - #------------------------------------------------------------------------------ --# $File: commands,v 1.44 2013/02/05 15:20:47 christos Exp $ -+# $File: commands,v 1.45 2013/02/06 14:18:52 christos Exp $ - # commands: file(1) magic for various shells and interpreters - # - #0 string/w : shell archive or script for antique kernel text @@ -49,7 +49,7 @@ !:mime text/x-awk 0 string/wt #!\ /usr/bin/awk awk script text executable @@ -36,4 +28,56 @@ index 67c3eee..4a7d8dd 100644 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable -- 1.8.5.5 +From 0b478f445b6b7540b58af5d1fe583fa9e48fd745 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <christos@zoulas.com> +Date: Wed, 28 May 2014 19:52:36 +0000 +Subject: [PATCH] further optimize awk by not looking for the BEGIN regex until + we found the BEGIN (Jan Kaluza) + +--- + magic/Magdir/commands | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/magic/Magdir/commands b/magic/Magdir/commands +index bfffdef..26b2869 100644 +--- a/magic/Magdir/commands ++++ b/magic/Magdir/commands +@@ -49,7 +49,8 @@ + !:mime text/x-awk + 0 string/wt #!\ /usr/bin/awk awk script text executable + !:mime text/x-awk +-0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text ++0 search/16384 BEGIN ++>0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text + + # AT&T Bell Labs' Plan 9 shell + 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable +-- +2.0.3 + +From 71a8b6c0d758acb0f73e2e51421a711b5e9d6668 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <christos@zoulas.com> +Date: Fri, 30 May 2014 16:48:44 +0000 +Subject: [PATCH] Limit regex search for BEGIN to the first 4K of the file. + +--- + magic/Magdir/commands | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/magic/Magdir/commands b/magic/Magdir/commands +index 26b2869..bcd0f43 100644 +--- a/magic/Magdir/commands ++++ b/magic/Magdir/commands +@@ -49,8 +49,7 @@ + !:mime text/x-awk + 0 string/wt #!\ /usr/bin/awk awk script text executable + !:mime text/x-awk +-0 search/16384 BEGIN +->0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text ++0 regex/4096 =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text + + # AT&T Bell Labs' Plan 9 shell + 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable +-- +2.0.3 |