summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-06-09 20:12:44 +0000
committerRichard M. Stallman <rms@gnu.org>1998-06-09 20:12:44 +0000
commit08598d7209ec52c3d8aec439b022a5e55a560ebd (patch)
treed6a9e861ddad504e02f5ca3ff9205ee0a298bf46
parent997facd2ec0251d936b4a1cd44bdf38edaf00b72 (diff)
downloademacs-08598d7209ec52c3d8aec439b022a5e55a560ebd.tar.gz
(PTR_TO_OFFSET): Alternate definition if not `emacs'.
-rw-r--r--src/regex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/regex.c b/src/regex.c
index 2a260376833..e4422ce9383 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -27,11 +27,15 @@
#undef _GNU_SOURCE
#define _GNU_SOURCE
+#ifdef emacs
/* Converts the pointer to the char to BEG-based offset from the start. */
#define PTR_TO_OFFSET(d) \
POS_AS_IN_BUFFER (MATCHING_IN_FIRST_STRING \
? (d) - string1 : (d) - (string2 - size1))
#define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object)))
+#else
+#define PTR_TO_OFFSET(d) 0
+#endif
#ifdef HAVE_CONFIG_H
#include <config.h>