aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-12-12 14:44:09 +0000
committerJim Blandy1992-12-12 14:44:09 +0000
commit71715da973271729a9c02cfaeb548a570c0d1d8a (patch)
tree6ceaba3991bcdbc263687220cf4eeac0efa55bcb /src
parentc6b4078874633d5403b27c82d1a09a2f887cedf9 (diff)
downloademacs-71715da973271729a9c02cfaeb548a570c0d1d8a.tar.gz
emacs-71715da973271729a9c02cfaeb548a570c0d1d8a.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/regex.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/regex.c b/src/regex.c
index a0e4e8950e5..c1609504dff 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -29,7 +29,7 @@
29/* We need this for `regex.h', and perhaps for the Emacs include files. */ 29/* We need this for `regex.h', and perhaps for the Emacs include files. */
30#include <sys/types.h> 30#include <sys/types.h>
31 31
32#if defined (HAVE_CONFIG_H) || defined (emacs) 32#ifdef HAVE_CONFIG_H
33#include "config.h" 33#include "config.h"
34#endif 34#endif
35 35
@@ -3989,21 +3989,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
3989 3989
3990 /* If we're at the end of the pattern, we can change. */ 3990 /* If we're at the end of the pattern, we can change. */
3991 if (p2 == pend) 3991 if (p2 == pend)
3992 { /* But if we're also at the end of the string, we might 3992 {
3993 as well skip changing anything. For example, in `a+' 3993 /* Consider what happens when matching ":\(.*\)"
3994 against `a', we'll have already matched the `a', and 3994 against ":/". I don't really understand this code
3995 I don't see the the point of changing the opcode, 3995 yet. */
3996 popping the failure point, finding out it fails, and
3997 then going into our endgame. */
3998 if (d == dend)
3999 {
4000 p = pend;
4001 DEBUG_PRINT1 (" End of pattern & string => done.\n");
4002 continue;
4003 }
4004
4005 p[-3] = (unsigned char) pop_failure_jump; 3996 p[-3] = (unsigned char) pop_failure_jump;
4006 DEBUG_PRINT1 (" End of pattern => pop_failure_jump.\n"); 3997 DEBUG_PRINT1
3998 (" End of pattern: change to `pop_failure_jump'.\n");
4007 } 3999 }
4008 4000
4009 else if ((re_opcode_t) *p2 == exactn 4001 else if ((re_opcode_t) *p2 == exactn