summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/regexp.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-12-03 03:02:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-12-03 03:02:54 +0000
commitba0a2090f574df90404f8a0bbe689389ce0ebcab (patch)
tree53f8d0ad53e5fc0f05d68a0073273080ef5bd392 /gnu/usr.bin/perl/regexp.h
parent0121b80e4f69c2ad9631e8d20b5c91f3b2a40434 (diff)
Resolve conflicts for perl 5.8.2, remove old files, and add OpenBSD-specific scaffolding
Diffstat (limited to 'gnu/usr.bin/perl/regexp.h')
-rw-r--r--gnu/usr.bin/perl/regexp.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/regexp.h b/gnu/usr.bin/perl/regexp.h
index 81552baf6ce..adc265e3edc 100644
--- a/gnu/usr.bin/perl/regexp.h
+++ b/gnu/usr.bin/perl/regexp.h
@@ -1,6 +1,7 @@
/* regexp.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (C) 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2003,
+ * by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -71,6 +72,7 @@ typedef struct regexp {
#define ROPT_NAUGHTY 0x20000 /* how exponential is this pattern? */
#define ROPT_COPY_DONE 0x40000 /* subbeg is a copy of the string */
#define ROPT_TAINTED_SEEN 0x80000
+#define ROPT_MATCH_UTF8 0x10000000 /* subbeg is utf-8 */
#define RE_USE_INTUIT_NOML 0x0100000 /* Best to intuit before matching */
#define RE_USE_INTUIT_ML 0x0200000
@@ -99,6 +101,13 @@ typedef struct regexp {
? RX_MATCH_COPIED_on(prog) \
: RX_MATCH_COPIED_off(prog))
+#define RX_MATCH_UTF8(prog) ((prog)->reganch & ROPT_MATCH_UTF8)
+#define RX_MATCH_UTF8_on(prog) ((prog)->reganch |= ROPT_MATCH_UTF8)
+#define RX_MATCH_UTF8_off(prog) ((prog)->reganch &= ~ROPT_MATCH_UTF8)
+#define RX_MATCH_UTF8_set(prog, t) ((t) \
+ ? (RX_MATCH_UTF8_on(prog), (PL_reg_match_utf8 = 1)) \
+ : (RX_MATCH_UTF8_off(prog), (PL_reg_match_utf8 = 0)))
+
#define REXEC_COPY_STR 0x01 /* Need to copy the string. */
#define REXEC_CHECKED 0x02 /* check_substr already checked. */
#define REXEC_SCREAM 0x04 /* use scream table. */