summaryrefslogtreecommitdiffstats
path: root/contrib/less/pattern.h
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2012-06-26 23:17:33 +0000
committerdelphij <delphij@FreeBSD.org>2012-06-26 23:17:33 +0000
commit922d40fed4b7f6bb0aafe327600825f9680ce0e7 (patch)
tree1acc67942c59e279c426e0a72ee0ad94cb0ed3ba /contrib/less/pattern.h
parentbd43c5e6d640101f1bd6cca7e83586ae41e1a065 (diff)
downloadFreeBSD-src-922d40fed4b7f6bb0aafe327600825f9680ce0e7.zip
FreeBSD-src-922d40fed4b7f6bb0aafe327600825f9680ce0e7.tar.gz
MFV: less v449.
Diffstat (limited to 'contrib/less/pattern.h')
-rw-r--r--contrib/less/pattern.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/contrib/less/pattern.h b/contrib/less/pattern.h
index c92aa02..2bcc7ab 100644
--- a/contrib/less/pattern.h
+++ b/contrib/less/pattern.h
@@ -1,12 +1,18 @@
-/*
- * Copyright (C) 1984-2011 Mark Nudelman
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Less License, as specified in the README file.
- *
- * For more information about less, or for information on how to
- * contact the author, see the README file.
- */
+/*
+ * Copyright (C) 1984-2012 Mark Nudelman
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Less License, as specified in the README file.
+ *
+ * For more information, see the README file.
+ */
+
+#if HAVE_GNU_REGEX
+#define __USE_GNU 1
+#include <regex.h>
+#define DEFINE_PATTERN(name) struct re_pattern_buffer *name
+#define CLEAR_PATTERN(name) name = NULL
+#endif
#if HAVE_POSIX_REGCOMP
#include <regex.h>
@@ -47,3 +53,7 @@ extern char *__loc1;
#define CLEAR_PATTERN(name) name = NULL
#endif
+#if NO_REGEX
+#define DEFINE_PATTERN(name)
+#define CLEAR_PATTERN(name)
+#endif
OpenPOWER on IntegriCloud