/[pkgs]/devel/grep/grep-2.5.3-case.patch
ViewVC logotype

Contents of /devel/grep/grep-2.5.3-case.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Sun Nov 23 18:34:10 2008 UTC (12 months ago) by lkundrak
Branch: MAIN
CVS Tags: F-12-split, F-11-split, grep-2_5_3-5_fc12, grep-2_5_3-3_fc11, grep-2_5_3-2_fc11, grep-2_5_3-6_fc12, grep-2_5_3-4_fc11, grep-2_5_3-1_fc11, HEAD
File MIME type: text/x-patch
* Thu Nov 20 2008 Lubomir Rintel <lkundrak@v3.sk> 2.5.3-1
- Update to latest upstream version
- Drop upstreamed patches
- Add a couple of regression tests
- Temporarily disable tests
- Minor cleanup
1 From 68f09677b7aaedafa8c29280ccd76a034fe269f1 Mon Sep 17 00:00:00 2001
2 From: Debian <debian>
3 Date: Sun, 23 Nov 2008 17:28:46 +0100
4 Subject: [PATCH] Case-insensitive list matching fix
5
6 This fixes case-insensitive matching of lists in multi-byte character sets.
7 Original comment:
8
9 fix the following problem in multibyte locales.
10 % echo Y | egrep -i '[y]'
11 %
12
13 derived from gawk's dfa.c.
14
15 Original ticket: https://bugzilla.redhat.com/show_bug.cgi?id=123363
16 Debian: 61-dfa.c-case_fold-charclass.patch
17 ---
18 src/dfa.c | 14 ++++++++++++++
19 1 files changed, 14 insertions(+), 0 deletions(-)
20
21 diff --git a/src/dfa.c b/src/dfa.c
22 index 934be97..088c379 100644
23 --- a/src/dfa.c
24 +++ b/src/dfa.c
25 @@ -689,6 +689,20 @@ parse_bracket_exp_mb ()
26 REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al,
27 work_mbc->nchars + 1);
28 work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc;
29 + if (case_fold && (iswlower((wint_t) wc) || iswupper((wint_t) wc)))
30 + {
31 + wint_t altcase;
32 +
33 + altcase = wc; /* keeps compiler happy */
34 + if (iswlower((wint_t) wc))
35 + altcase = towupper((wint_t) wc);
36 + else if (iswupper((wint_t) wc))
37 + altcase = towlower((wint_t) wc);
38 +
39 + REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al,
40 + work_mbc->nchars + 1);
41 + work_mbc->chars[work_mbc->nchars++] = (wchar_t) altcase;
42 + }
43 }
44 }
45 while ((wc = wc1) != L']');
46 --
47 1.5.5.1
48

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2