1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/lib/libast/regex
Martijn Dekker de511cfbc2 libast: regex: re-backport robustness improvements from 93v- beta
That intermittent regression test failure in types.sh seems to be
gone. So let's reimport the regex changes into the 1.0 branch to
subject them to wider testing and make sure any failures stay gone.
(re: 48568476, 38aab428, 1aa8f771)

[Original commit message from 1aa8f771 follows]

There are two main changes:

1. The regex code now creates and uses its own stack (env->mst)
   instead of using the shared standard stack (stkstd). That seems
   likely to be a good thing.

2. Missing mbinit() calls were inserted. The 93v- code uses a
   completely different multibyte characters API, so these needed
   to be translated back to the older API. But, as mbinit() is no
   longer a no-op as of 300cd199, these calls do stop things from
   breaking if a previous operation is interrupted mid-character.

I think there might be a couple of off-by-one errors fixed as well,
as there are two instances of this change:

-               while ((index += skip[buf[index]]) < mid);
+               while (index < mid)
+                       index += skip[buf[index]];
2021-12-28 22:24:41 +00:00
..
regalloc.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
regcache.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
regclass.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
regcoll.c libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regcomp.c libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regdecomp.c libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regerror.c libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regexec.c libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regfatal.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
reginit.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
reglib.h libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regnexec.c libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regrecord.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
regrexec.c libast: regex: re-backport robustness improvements from 93v- beta 2021-12-28 22:24:41 +00:00
regstat.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
regsub.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
regsubcomp.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00
regsubexec.c INIT: remove proto, ratz (re: 46593a89, 6137b99a); major cleanup 2021-12-24 07:05:22 +00:00