mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* posix/regex.c (SET_HIGH_BOUND): New macro.
(MOVE_BUFFER_POINTER): Use it. (ELSE_EXTEND_BUFFER_HIGH_BOUND): New macro. (EXTEND_BUFFER): Use it. 2000-08-04 Greg McGary <greg@mcgary.org> * posix/regex.c (SET_HIGH_BOUND): New macro. (MOVE_BUFFER_POINTER): Use it. (ELSE_EXTEND_BUFFER_HIGH_BOUND): New macro. (EXTEND_BUFFER): Use it.
This commit is contained in:
parent
cd8b7ff913
commit
13550428ee
@ -1,3 +1,10 @@
|
||||
2000-08-04 Greg McGary <greg@mcgary.org>
|
||||
|
||||
* posix/regex.c (SET_HIGH_BOUND): New macro.
|
||||
(MOVE_BUFFER_POINTER): Use it.
|
||||
(ELSE_EXTEND_BUFFER_HIGH_BOUND): New macro.
|
||||
(EXTEND_BUFFER): Use it.
|
||||
|
||||
2000-08-03 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* libio/iofwide.c (_IO_fwide): Initialize fp->_codecvt as well.
|
||||
|
@ -1748,11 +1748,24 @@ static reg_errcode_t compile_range _RE_ARGS ((unsigned int range_start,
|
||||
correct places in the new one. If extending the buffer results in it
|
||||
being larger than MAX_BUF_SIZE, then flag memory exhausted. */
|
||||
#if __BOUNDED_POINTERS__
|
||||
# define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated)
|
||||
# define MOVE_BUFFER_POINTER(P) \
|
||||
(__ptrhigh (P) = (__ptrlow (P) += incr) + bufp->allocated, \
|
||||
__ptrvalue (P) += incr)
|
||||
(__ptrlow (P) += incr, SET_HIGH_BOUND (P), __ptrvalue (P) += incr)
|
||||
# define ELSE_EXTEND_BUFFER_HIGH_BOUND \
|
||||
else \
|
||||
{ \
|
||||
SET_HIGH_BOUND (b); \
|
||||
SET_HIGH_BOUND (begalt); \
|
||||
if (fixup_alt_jump) \
|
||||
SET_HIGH_BOUND (fixup_alt_jump); \
|
||||
if (laststart) \
|
||||
SET_HIGH_BOUND (laststart); \
|
||||
if (pending_exact) \
|
||||
SET_HIGH_BOUND (pending_exact); \
|
||||
}
|
||||
#else
|
||||
# define MOVE_BUFFER_POINTER(P) (P) += incr
|
||||
# define ELSE_EXTEND_BUFFER_HIGH_BOUND
|
||||
#endif
|
||||
#define EXTEND_BUFFER() \
|
||||
do { \
|
||||
@ -1778,6 +1791,7 @@ static reg_errcode_t compile_range _RE_ARGS ((unsigned int range_start,
|
||||
if (pending_exact) \
|
||||
MOVE_BUFFER_POINTER (pending_exact); \
|
||||
} \
|
||||
ELSE_EXTEND_BUFFER_HIGH_BOUND \
|
||||
} while (0)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user