aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.h
diff options
context:
space:
mode:
authorKarl Berry <[email protected]>1992-11-21 01:51:33 +0000
committerKarl Berry <[email protected]>1992-11-21 01:51:33 +0000
commit9114e2792fe477299d6d7f8856c616fe4ce31d21 (patch)
tree0289e6410211f571f96229fc8321d9e83b1abef1 /src/regex.h
parent9549c46d0b7b76c104c152e78feb33029c0e562a (diff)
*** empty log message ***
Diffstat (limited to 'src/regex.h')
-rw-r--r--src/regex.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/regex.h b/src/regex.h
index ef8e9a3669..e38853eaf6 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -20,12 +20,15 @@
#ifndef __REGEXP_LIBRARY_H__
#define __REGEXP_LIBRARY_H__
+/* POSIX says that <sys/types.h> must be included (by the caller) before
+ <regex.h>. */
+
#ifdef VMS
-/* POSIX says that size_t should be in stddef.h. */
+/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
+ should be there. */
#include <stddef.h>
#endif
-/* POSIX says that <sys/types.h> must be included before <regex.h>. */
/* The following bits are used to determine the regexp syntax we
recognize. The set/not-set meanings are chosen so that Emacs syntax
@@ -162,6 +165,9 @@ extern reg_syntax_t re_syntax_options;
#define RE_SYNTAX_POSIX_EGREP \
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
+/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
+#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
/* Syntax bits common to both basic and extended POSIX regex syntax. */
@@ -316,12 +322,12 @@ struct re_pattern_buffer
#define REGS_FIXED 2
unsigned regs_allocated : 2;
- /* Set to zero when regex_compile compiles a pattern; set to one
- by re_compile_fastmap when it updates the fastmap, if any. */
+ /* Set to zero when `regex_compile' compiles a pattern; set to one
+ by `re_compile_fastmap' if it updates the fastmap. */
unsigned fastmap_accurate : 1;
- /* If set, regexec reports only success or failure and does not
- return anything in pmatch. */
+ /* If set, `re_match_2' does not return information about
+ subexpressions. */
unsigned no_sub : 1;
/* If set, a beginning-of-line anchor doesn't match at the
@@ -383,17 +389,17 @@ typedef struct
unfortunately clutters up the declarations a bit, but I think it's
worth it.
- We also have to undo `const' if we are not ANSI and if it hasn't
- previously being taken care of. */
+ We may also have to undo `const' if we are not ANSI -- but if it has
+ already been defined, as by Autoconf's AC_CONST, don't do anything. */
#if __STDC__
#define _RE_ARGS(args) args
-#else
+#else /* not __STDC__ */
#define _RE_ARGS(args) ()
-#ifndef const
+#if !const && !HAVE_CONST
#define const
#endif
-#endif
+#endif /* not __STDC__ */
/* Sets the current default syntax to SYNTAX, and return the old syntax.
You can also simply assign to the `re_syntax_options' variable. */