Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37041800
en ru br
Репозитории ALT
S:5.1.0.0.213.d04f-alt1
5.1: 3.1.6-alt3
4.1: 3.1.5-alt3
4.0: 3.1.5-alt3
3.0: 3.1.4-alt2
www.altlinux.org/Changes

Группа :: Работа с текстами
Пакет: gawk

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: gawk-3.1.4-rh-dfacache.patch
Скачать


--- gawk-3.1.4/dfa.c.dfacache	2004-11-09 14:42:53.594099744 +0100
+++ gawk-3.1.4/dfa.c	2004-11-09 14:45:38.661005760 +0100
@@ -2871,6 +2871,14 @@
   if (MB_CUR_MAX > 1)
     {
       int remain_bytes, i;
+#if 0
+      /*
+       * This caching can get things wrong:
+
+      printf "ab\n\tb\n" | LC_ALL=de_DE.UTF-8 ./gawk '/^[ \t]/ { print }'
+
+       * should print \tb but doesn't
+       */
       buf_begin -= buf_offset;
       if (buf_begin <= (unsigned char const *)begin && (unsigned char const *) end <= buf_end) {
 	buf_offset = (unsigned char const *)begin - buf_begin;
@@ -2878,6 +2886,7 @@
 	buf_end = end;
 	goto go_fast;
       }
+#endif
 
       buf_offset = 0;
       buf_begin = begin;
@@ -2916,7 +2925,9 @@
       mblen_buf[i] = 0;
       inputwcs[i] = 0; /* sentinel */
     }
+#if 0
 go_fast:
+#endif
 #endif /* MBS_SUPPORT */
 
   for (;;)
@@ -2930,7 +2941,7 @@
             s1 = s;
 	    if (d->states[s].mbps.nelem != 0)
 	      {
-		/* Can match with a multibyte character( and multi character
+		/* Can match with a multibyte character (and multi character
 		   collating element).  */
 		unsigned char const *nextp;
 
@@ -3668,9 +3679,9 @@
  done:
   if (strlen(result))
     {
-      dm = (struct dfamust *) malloc(sizeof (struct dfamust));
+      MALLOC(dm, struct dfamust, 1);
       dm->exact = exact;
-      dm->must = malloc(strlen(result) + 1);
+      MALLOC(dm->must, char, strlen(result) + 1);
       strcpy(dm->must, result);
       dm->next = dfa->musts;
       dfa->musts = dm;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin