cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs/lib ChangeLog regcomp.c regex.h


From: Mark D. Baushke
Subject: [Cvs-cvs] ccvs/lib ChangeLog regcomp.c regex.h
Date: Fri, 14 Apr 2006 07:40:35 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Branch:         
Changes by:     Mark D. Baushke <address@hidden>        06/04/14 07:40:35

Modified files:
        lib            : ChangeLog regcomp.c regex.h 

Log message:
        * regcomp.c, regex.h: Update from GNULIB.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/ChangeLog.diff?tr1=1.500&tr2=1.501&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/regcomp.c.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/regex.h.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: ccvs/lib/ChangeLog
diff -u ccvs/lib/ChangeLog:1.500 ccvs/lib/ChangeLog:1.501
--- ccvs/lib/ChangeLog:1.500    Wed Apr 12 19:54:01 2006
+++ ccvs/lib/ChangeLog  Fri Apr 14 07:40:35 2006
@@ -1,3 +1,7 @@
+2006-04-14  Mark D. Baushke  <address@hidden>
+
+       * regcomp.c, regex.h: Update from GNULIB.
+
 2006-04-12  Derek Price  <address@hidden>
 
        * inttypes.h: New file, pre GNULIB.
Index: ccvs/lib/regcomp.c
diff -u ccvs/lib/regcomp.c:1.8 ccvs/lib/regcomp.c:1.9
--- ccvs/lib/regcomp.c:1.8      Tue Apr 11 20:21:31 2006
+++ ccvs/lib/regcomp.c  Fri Apr 14 07:40:35 2006
@@ -836,15 +836,17 @@
 #ifndef _LIBC
   char *codeset_name;
 #endif
+#ifdef RE_ENABLE_I18N
+  size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
+#else
+  size_t max_i18n_object_size = 0;
+#endif
   size_t max_object_size =
     MAX (sizeof (struct re_state_table_entry),
         MAX (sizeof (re_token_t),
              MAX (sizeof (re_node_set),
                   MAX (sizeof (regmatch_t),
-                       MAX (sizeof (regoff_t),
-                            MAX (sizeof (wchar_t),
-                                 MAX (sizeof (wctype_t),
-                                      sizeof (Idx))))))));
+                       max_i18n_object_size))));
 
   memset (dfa, '\0', sizeof (re_dfa_t));
 
Index: ccvs/lib/regex.h
diff -u ccvs/lib/regex.h:1.12 ccvs/lib/regex.h:1.13
--- ccvs/lib/regex.h:1.12       Tue Apr 11 20:21:31 2006
+++ ccvs/lib/regex.h    Fri Apr 14 07:40:35 2006
@@ -322,7 +322,14 @@
 # ifdef RE_DUP_MAX
 #  undef RE_DUP_MAX
 # endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows.  */
+
+/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
+   the counter as a 2-byte signed integer.  This is no longer true, so
+   RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
+   ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+   However, there would be a huge performance problem if someone
+   actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
+   its historical value.  */
 # define RE_DUP_MAX (0x7fff)
 
 #endif /* defined __USE_GNU_REGEX */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]