diff options
| author | Richard M. Stallman | 1998-06-09 20:12:44 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-06-09 20:12:44 +0000 |
| commit | 5135279640195ab28e51ec5e12b0de008d35858d (patch) | |
| tree | c90913f9e762077cd4f806ecf2396a661131666f /src | |
| parent | 66191b7ecb59a4007a433ae9bebfdc0af2862e2a (diff) | |
| download | emacs-5135279640195ab28e51ec5e12b0de008d35858d.tar.gz emacs-5135279640195ab28e51ec5e12b0de008d35858d.zip | |
(PTR_TO_OFFSET): Alternate definition if not `emacs'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex.c | 4 |
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 @@ | |||
| 27 | #undef _GNU_SOURCE | 27 | #undef _GNU_SOURCE |
| 28 | #define _GNU_SOURCE | 28 | #define _GNU_SOURCE |
| 29 | 29 | ||
| 30 | #ifdef emacs | ||
| 30 | /* Converts the pointer to the char to BEG-based offset from the start. */ | 31 | /* Converts the pointer to the char to BEG-based offset from the start. */ |
| 31 | #define PTR_TO_OFFSET(d) \ | 32 | #define PTR_TO_OFFSET(d) \ |
| 32 | POS_AS_IN_BUFFER (MATCHING_IN_FIRST_STRING \ | 33 | POS_AS_IN_BUFFER (MATCHING_IN_FIRST_STRING \ |
| 33 | ? (d) - string1 : (d) - (string2 - size1)) | 34 | ? (d) - string1 : (d) - (string2 - size1)) |
| 34 | #define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object))) | 35 | #define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object))) |
| 36 | #else | ||
| 37 | #define PTR_TO_OFFSET(d) 0 | ||
| 38 | #endif | ||
| 35 | 39 | ||
| 36 | #ifdef HAVE_CONFIG_H | 40 | #ifdef HAVE_CONFIG_H |
| 37 | #include <config.h> | 41 | #include <config.h> |