FreeBSD Bugzilla – Attachment 167690 Details for
Bug 207681
[libc] re-enable regex bayer-moore for the general multibyte case
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Enable regex multibyte support
file_207681.txt (text/plain), 1.58 KB, created by
Pedro F. Giffuni
on 2016-03-03 19:02:24 UTC
(
hide
)
Description:
Enable regex multibyte support
Filename:
MIME Type:
Creator:
Pedro F. Giffuni
Created:
2016-03-03 19:02:24 UTC
Size:
1.58 KB
patch
obsolete
>Index: lib/libc/regex/regex.3 >=================================================================== >--- lib/libc/regex/regex.3 (revision 286580) >+++ lib/libc/regex/regex.3 (working copy) >@@ -723,5 +723,3 @@ > .Pp > The implementation of word-boundary matching is a bit of a kludge, > and bugs may lurk in combinations of word-boundary matching and anchoring. >-.Pp >-Word-boundary matching does not work properly in multibyte locales. >Index: lib/libc/regex/regexec.c >=================================================================== >--- lib/libc/regex/regexec.c (revision 286580) >+++ lib/libc/regex/regexec.c (working copy) >@@ -116,9 +116,9 @@ > #define FWD(dst, src, n) ((dst) |= ((unsigned long)(src)&(here)) << (n)) > #define BACK(dst, src, n) ((dst) |= ((unsigned long)(src)&(here)) >> (n)) > #define ISSETBACK(v, n) (((v) & ((unsigned long)here >> (n))) != 0) >-/* no multibyte support */ >-#define XMBRTOWC xmbrtowc_dummy >-#define ZAPSTATE(mbs) ((void)(mbs)) >+/* multibyte support */ >+#define XMBRTOWC xmbrtowc >+#define ZAPSTATE(mbs) memset((mbs), 0, sizeof(*(mbs))) > /* function names */ > #define SNAMES /* engine.c looks after details */ > >@@ -170,9 +170,9 @@ > #define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here]) > #define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here]) > #define ISSETBACK(v, n) ((v)[here - (n)]) >-/* no multibyte support */ >-#define XMBRTOWC xmbrtowc_dummy >-#define ZAPSTATE(mbs) ((void)(mbs)) >+/* multibyte support */ >+#define XMBRTOWC xmbrtowc >+#define ZAPSTATE(mbs) memset((mbs), 0, sizeof(*(mbs))) > /* function names */ > #define LNAMES /* flag */ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207681
: 167690