[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/regex.c,v [EMACS_22_BASE]
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/src/regex.c,v [EMACS_22_BASE] |
Date: |
Wed, 26 Mar 2008 22:57:43 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Chong Yidong <cyd> 08/03/26 22:57:43
Index: regex.c
===================================================================
RCS file: /sources/emacs/emacs/src/regex.c,v
retrieving revision 1.222.2.2
retrieving revision 1.222.2.3
diff -u -b -r1.222.2.2 -r1.222.2.3
--- regex.c 8 Aug 2007 07:49:14 -0000 1.222.2.2
+++ regex.c 26 Mar 2008 22:57:42 -0000 1.222.2.3
@@ -1833,7 +1833,9 @@
#if __BOUNDED_POINTERS__
# define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated)
# define MOVE_BUFFER_POINTER(P) \
- (__ptrlow (P) += incr, SET_HIGH_BOUND (P), __ptrvalue (P) += incr)
+ (__ptrlow (P) = new_buffer + (__ptrlow (P) - old_buffer), \
+ SET_HIGH_BOUND (P), \
+ __ptrvalue (P) = new_buffer + (__ptrvalue (P) - old_buffer))
# define ELSE_EXTEND_BUFFER_HIGH_BOUND \
else \
{ \
@@ -1847,12 +1849,12 @@
SET_HIGH_BOUND (pending_exact); \
}
#else
-# define MOVE_BUFFER_POINTER(P) (P) += incr
+# define MOVE_BUFFER_POINTER(P) ((P) = new_buffer + ((P) - old_buffer))
# define ELSE_EXTEND_BUFFER_HIGH_BOUND
#endif
#define EXTEND_BUFFER()
\
do { \
- re_char *old_buffer = bufp->buffer;
\
+ unsigned char *old_buffer = bufp->buffer;
\
if (bufp->allocated == MAX_BUF_SIZE) \
return REG_ESIZE;
\
bufp->allocated <<= 1; \
@@ -1864,7 +1866,7 @@
/* If the buffer moved, move all the pointers into it. */ \
if (old_buffer != bufp->buffer) \
{
\
- int incr = bufp->buffer - old_buffer; \
+ unsigned char *new_buffer = bufp->buffer; \
MOVE_BUFFER_POINTER (b); \
MOVE_BUFFER_POINTER (begalt); \
if (fixup_alt_jump) \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/regex.c,v [EMACS_22_BASE],
Chong Yidong <=