Module Name: src
Committed By: martin
Date: Wed Apr 21 17:47:40 UTC 2021
Modified Files:
src/external/bsd/file/dist/magic/magdir [netbsd-8]: python windows
Log Message:
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).
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.9 -r1.1.1.9.2.1 \
src/external/bsd/file/dist/magic/magdir/python
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \
src/external/bsd/file/dist/magic/magdir/windows
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/file/dist/magic/magdir/python
diff -u src/external/bsd/file/dist/magic/magdir/python:1.1.1.9 src/external/bsd/file/dist/magic/magdir/python:1.1.1.9.2.1
--- src/external/bsd/file/dist/magic/magdir/python:1.1.1.9 Wed May 24 23:59:57 2017
+++ src/external/bsd/file/dist/magic/magdir/python Wed Apr 21 17:47:40 2021
@@ -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
Index: src/external/bsd/file/dist/magic/magdir/windows
diff -u src/external/bsd/file/dist/magic/magdir/windows:1.1.1.8 src/external/bsd/file/dist/magic/magdir/windows:1.1.1.8.2.1
--- src/external/bsd/file/dist/magic/magdir/windows:1.1.1.8 Wed May 24 23:59:57 2017
+++ src/external/bsd/file/dist/magic/magdir/windows Wed Apr 21 17:47:40 2021
@@ -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