/[gentoo-alt]/trunk/sys-apps/gawk/files/gawk-3.1.4-disable-DFA.patch
Gentoo

Contents of /trunk/sys-apps/gawk/files/gawk-3.1.4-disable-DFA.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 242 - (show annotations) (download)
Sun Feb 27 23:26:00 2005 UTC (9 years, 6 months ago) by angusyoung
File size: 1837 byte(s)
Bumped gawk from 3.1.4 to 3.1.4-r4

1 # Taken from Fedora SRPM gawk-3.1.4-4:
2 # http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/gawk-3.1.4-4.src.rpm
3 #
4 # * Tue Nov 9 2004 Karel Zak <kzak@redhat.com> 3.1.4-2
5 # - add dfacache.patch for fix LC_ALL=de_DE.UTF-8 ./gawk '/^[ \t]/ { print }',
6 # (by Aharon Robbins), #135210, #131498
7
8 --- gawk-3.1.4/dfa.c.dfacache 2004-11-09 14:42:53.594099744 +0100
9 +++ gawk-3.1.4/dfa.c 2004-11-09 14:45:38.661005760 +0100
10 @@ -2871,6 +2871,14 @@
11 if (MB_CUR_MAX > 1)
12 {
13 int remain_bytes, i;
14 +#if 0
15 + /*
16 + * This caching can get things wrong:
17 +
18 + printf "ab\n\tb\n" | LC_ALL=de_DE.UTF-8 ./gawk '/^[ \t]/ { print }'
19 +
20 + * should print \tb but doesn't
21 + */
22 buf_begin -= buf_offset;
23 if (buf_begin <= (unsigned char const *)begin && (unsigned char const *) end <= buf_end) {
24 buf_offset = (unsigned char const *)begin - buf_begin;
25 @@ -2878,6 +2886,7 @@
26 buf_end = end;
27 goto go_fast;
28 }
29 +#endif
30
31 buf_offset = 0;
32 buf_begin = begin;
33 @@ -2916,7 +2925,9 @@
34 mblen_buf[i] = 0;
35 inputwcs[i] = 0; /* sentinel */
36 }
37 +#if 0
38 go_fast:
39 +#endif
40 #endif /* MBS_SUPPORT */
41
42 for (;;)
43 @@ -2930,7 +2941,7 @@
44 s1 = s;
45 if (d->states[s].mbps.nelem != 0)
46 {
47 - /* Can match with a multibyte character( and multi character
48 + /* Can match with a multibyte character (and multi character
49 collating element). */
50 unsigned char const *nextp;
51
52 @@ -3668,9 +3679,9 @@
53 done:
54 if (strlen(result))
55 {
56 - dm = (struct dfamust *) malloc(sizeof (struct dfamust));
57 + MALLOC(dm, struct dfamust, 1);
58 dm->exact = exact;
59 - dm->must = malloc(strlen(result) + 1);
60 + MALLOC(dm->must, char, strlen(result) + 1);
61 strcpy(dm->must, result);
62 dm->next = dfa->musts;
63 dfa->musts = dm;

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20