summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/lib/regex.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-03-10 13:40:57 +0000
committerpeter <peter@FreeBSD.org>1998-03-10 13:40:57 +0000
commit0c111e2b51cac7eead56494b30c5977e4ec9a8ea (patch)
treef60b0014663435c30f2efea2b10ca4f8ecc0208c /contrib/cvs/lib/regex.c
parentc3a8ee0e80a59793349940056dfd14746ebd4905 (diff)
downloadFreeBSD-src-0c111e2b51cac7eead56494b30c5977e4ec9a8ea.zip
FreeBSD-src-0c111e2b51cac7eead56494b30c5977e4ec9a8ea.tar.gz
Import cvs-1.9.26 onto vendor branch
Diffstat (limited to 'contrib/cvs/lib/regex.c')
-rw-r--r--contrib/cvs/lib/regex.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/contrib/cvs/lib/regex.c b/contrib/cvs/lib/regex.c
index ddeca2a..38b31f4 100644
--- a/contrib/cvs/lib/regex.c
+++ b/contrib/cvs/lib/regex.c
@@ -1,6 +1,5 @@
-/* Extended regular expression matching and search library,
- version 0.12.
- (Implements POSIX draft P10003.2/D11.2, except for
+/* Extended regular expression matching and search library, version
+ 0.12. (Implements POSIX draft P10003.2/D11.2, except for
internationalization features.)
Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
@@ -39,10 +38,16 @@
#include "lisp.h"
#include "buffer.h"
+
+/* Make syntax table lookup grant data in gl_state. */
+#define SYNTAX_ENTRY_VIA_PROPERTY
+
#include "syntax.h"
+#include "charset.h"
+#include "category.h"
-/* Emacs uses `NULL' as a predicate. */
-#undef NULL
+#define malloc xmalloc
+#define free xfree
#else /* not emacs */
@@ -160,7 +165,7 @@ init_syntax_once ()
/* We remove any previous definition of `SIGN_EXTEND_CHAR',
since ours (we hope) works properly with all combinations of
machines, compilers, `char' and `unsigned char' argument types.
- (Per Bothner suggested the basic approach.) */
+ (Per Bothner suggested the basic approach.) */
#undef SIGN_EXTEND_CHAR
#if __STDC__
#define SIGN_EXTEND_CHAR(c) ((signed char) (c))
@@ -3807,15 +3812,15 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
/* Restore this and inner groups' (if any) registers. */
- for (r = *p; r < *p + *(p + 1); r++)
- {
- regstart[r] = old_regstart[r];
-
- /* xx why this test? */
- if ((int) old_regend[r] >= (int) regstart[r])
- regend[r] = old_regend[r];
- }
- }
+ for (r = *p; r < *p + *(p + 1); r++)
+ {
+ regstart[r] = old_regstart[r];
+
+ /* xx why this test? */
+ if (old_regend[r] >= regstart[r])
+ regend[r] = old_regend[r];
+ }
+ }
p1++;
EXTRACT_NUMBER_AND_INCR (mcnt, p1);
PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
OpenPOWER on IntegriCloud