[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/regex.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/regex.c |
Date: |
Thu, 28 Feb 2002 20:46:13 -0500 |
Index: emacs/src/regex.c
diff -c emacs/src/regex.c:1.173 emacs/src/regex.c:1.174
*** emacs/src/regex.c:1.173 Tue Oct 9 06:05:13 2001
--- emacs/src/regex.c Fri Nov 2 11:06:54 2001
***************
*** 1327,1333 ****
/* Roughly the maximum number of failure points on the stack. Would be
exactly that if always used TYPICAL_FAILURE_SIZE items each time we failed.
This is a variable only so users of regex can assign to it; we never
! change it ourselves. */
# if defined MATCH_MAY_ALLOCATE
/* Note that 4400 was enough to cause a crash on Alpha OSF/1,
whose default stack limit is 2mb. In order for a larger
--- 1327,1334 ----
/* Roughly the maximum number of failure points on the stack. Would be
exactly that if always used TYPICAL_FAILURE_SIZE items each time we failed.
This is a variable only so users of regex can assign to it; we never
! change it ourselves. We always multiply it by TYPICAL_FAILURE_SIZE
! before using it, so it should probably be a byte-count instead. */
# if defined MATCH_MAY_ALLOCATE
/* Note that 4400 was enough to cause a crash on Alpha OSF/1,
whose default stack limit is 2mb. In order for a larger
***************
*** 1579,1585 ****
/* Estimate the size of data pushed by a typical failure stack entry.
An estimate is all we need, because all we use this for
is to choose a limit for how big to make the failure stack. */
!
#define TYPICAL_FAILURE_SIZE 20
/* How many items can still be added to the stack without overflowing it. */
--- 1580,1586 ----
/* Estimate the size of data pushed by a typical failure stack entry.
An estimate is all we need, because all we use this for
is to choose a limit for how big to make the failure stack. */
! /* BEWARE, the value `20' is hard-coded in emacs.c:main(). */
#define TYPICAL_FAILURE_SIZE 20
/* How many items can still be added to the stack without overflowing it. */
***************
*** 1966,1974 ****
/* Map a string to the char class it names (if any). */
static re_wctype_t
! re_wctype (string)
! re_char *string;
{
if (STREQ (string, "alnum")) return RECC_ALNUM;
else if (STREQ (string, "alpha")) return RECC_ALPHA;
else if (STREQ (string, "word")) return RECC_WORD;
--- 1967,1976 ----
/* Map a string to the char class it names (if any). */
static re_wctype_t
! re_wctype (str)
! re_char *str;
{
+ const char *string = str;
if (STREQ (string, "alnum")) return RECC_ALNUM;
else if (STREQ (string, "alpha")) return RECC_ALPHA;
else if (STREQ (string, "word")) return RECC_WORD;
***************
*** 5837,5844 ****
int
regcomp (preg, pattern, cflags)
! regex_t *preg;
! const char *pattern;
int cflags;
{
reg_errcode_t ret;
--- 5839,5846 ----
int
regcomp (preg, pattern, cflags)
! regex_t *__restrict preg;
! const char *__restrict pattern;
int cflags;
{
reg_errcode_t ret;
***************
*** 5922,5929 ****
int
regexec (preg, string, nmatch, pmatch, eflags)
! const regex_t *preg;
! const char *string;
size_t nmatch;
regmatch_t pmatch[];
int eflags;
--- 5924,5931 ----
int
regexec (preg, string, nmatch, pmatch, eflags)
! const regex_t *__restrict preg;
! const char *__restrict string;
size_t nmatch;
regmatch_t pmatch[];
int eflags;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/regex.c,
Kenichi Handa <=