diff options
author | Greg McGary <greg@mcgary.org> | 2000-07-18 19:18:09 +0000 |
---|---|---|
committer | Greg McGary <greg@mcgary.org> | 2000-07-18 19:18:09 +0000 |
commit | f306e7ff7bb939bfd52c4f8ec001856e0f680d07 (patch) | |
tree | 0053bb8e7500e86f6b2122bfd6ce7419989c8eac /posix/regex.c | |
parent | 70c5b33d9f299675f5369df27b0f42c317344827 (diff) | |
download | glibc-f306e7ff7bb939bfd52c4f8ec001856e0f680d07.tar.gz glibc-f306e7ff7bb939bfd52c4f8ec001856e0f680d07.tar.xz glibc-f306e7ff7bb939bfd52c4f8ec001856e0f680d07.zip |
* posix/regex.c (EXTEND_BUFFER_HIGH_BOUND): New macro.
(EXTEND_BUFFER): Use it. 2000-07-18 Greg McGary <greg@mcgary.org> * posix/regex.c (EXTEND_BUFFER_HIGH_BOUND): New macro. (EXTEND_BUFFER): Use it.
Diffstat (limited to 'posix/regex.c')
-rw-r--r-- | posix/regex.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/posix/regex.c b/posix/regex.c index c9476be532..2c967297a5 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -1750,8 +1750,21 @@ static reg_errcode_t compile_range _RE_ARGS ((unsigned int range_start, #if __BOUNDED_POINTERS__ # define MOVE_BUFFER_POINTER(P) \ (__ptrlow (P) += incr, __ptrhigh (P) += incr, __ptrvalue (P) += incr) +# define EXTEND_BUFFER_HIGH_BOUND \ + do { \ + int incr = bufp->allocated >> 1; \ + __ptrhigh b += incr; \ + __ptrhigh begalt += incr; \ + if (fixup_alt_jump) \ + __ptrhigh fixup_alt_jump += incr; \ + if (laststart) \ + __ptrhigh laststart += incr; \ + if (pending_exact) \ + __ptrhigh pending_exact += incr; \ + } while (0) #else # define MOVE_BUFFER_POINTER(P) (P) += incr +# define EXTEND_BUFFER_HIGH_BOUND #endif #define EXTEND_BUFFER() \ do { \ @@ -1777,6 +1790,7 @@ static reg_errcode_t compile_range _RE_ARGS ((unsigned int range_start, if (pending_exact) \ MOVE_BUFFER_POINTER (pending_exact); \ } \ + EXTEND_BUFFER_HIGH_BOUND; \ } while (0) |