Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/external/bsd/file/dist/magic/magdir Apply patch, requeste...



details:   https://anonhg.NetBSD.org/src/rev/1b28b984808c
branches:  netbsd-8
changeset: 961471:1b28b984808c
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Apr 21 17:47:40 2021 +0000

description:
Apply patch, requested by mrg in ticket #1671:

        external/bsd/file/dist/magic/magdir/python
        external/bsd/file/dist/magic/magdir/windows

Enhance regex portability (by copying over the versions from file 5.40).

diffstat:

 external/bsd/file/dist/magic/magdir/python  |  7 ++++---
 external/bsd/file/dist/magic/magdir/windows |  2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (27 lines):

diff -r 543caa3df31c -r 1b28b984808c external/bsd/file/dist/magic/magdir/python
--- a/external/bsd/file/dist/magic/magdir/python        Tue Apr 06 18:10:43 2021 +0000
+++ b/external/bsd/file/dist/magic/magdir/python        Wed Apr 21 17:47:40 2021 +0000
@@ -71,7 +71,8 @@
 !:mime text/x-python
 
 # def name(args, args):
-0      regex    \^(\ |\\t){0,50}def\ {1,50}[a-zA-Z]{1,100}
->&0    regex   \ {0,50}\\(([a-zA-Z]|,|\ ){1,255}\\):$ Python script text executable
-!:mime text/x-python
+0      search/8192     def\ 
+>0     regex    \^[[:space:]]{0,50}def\ {1,50}[_a-zA-Z]{1,100}
+>>&0   regex    \\(([[:alpha:]*_,\ ]){0,255}\\):$ Python script text executable
 !:strength + 15
+!:mime text/x-script.python
diff -r 543caa3df31c -r 1b28b984808c external/bsd/file/dist/magic/magdir/windows
--- a/external/bsd/file/dist/magic/magdir/windows       Tue Apr 06 18:10:43 2021 +0000
+++ b/external/bsd/file/dist/magic/magdir/windows       Wed Apr 21 17:47:40 2021 +0000
@@ -299,7 +299,7 @@
 # Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013
 # empty ,comment , section
 # PR/383: remove unicode BOM because it is not portable across regex impls
-0      regex/s         \\`(\\r\\n|;|[[])
+#0     regex/s         \\`(\\r\\n|;|[[])
 # left bracket in section line
 >&0    search/8192     [
 # http://en.wikipedia.org/wiki/Autorun.inf



Home | Main Index | Thread Index | Old Index