Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wenbowang
grep
grep-2.6.3-glibc-matcher-fallback.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File grep-2.6.3-glibc-matcher-fallback.patch of Package grep
From 3fca11d78cfa1fec6199936d57871b9db08226ab Mon Sep 17 00:00:00 2001 From: Paolo Bonzini <bonzini@gnu.org> Date: Thu, 29 Apr 2010 17:13:32 +0200 Subject: [PATCH 2/2] fall back to glibc matcher if a MBCSET is found This patch works around the performance problems of multibyte grep upstream. For UTF-8 it should trigger only in the presence of MBCSET, e.g. [a-z]. For other character sets all brackets and `.` as well will trigger it. --- src/dfa.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/dfa.c b/src/dfa.c index e13c361..523fe05 100644 --- a/src/dfa.c +++ b/src/dfa.c @@ -2927,6 +2927,15 @@ dfaexec (struct dfa *d, char const *begin, char *end, continue; } + if (backref) + { + *backref = 1; + free(mblen_buf); + free(inputwcs); + *end = saved_end; + return (char *) p; + } + /* Can match with a multibyte character (and multi character collating element). Transition table might be updated. */ s = transit_state(d, s, &p); -- 1.6.6.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor