From 44c8d1a2a8775ad8c67fa1c46ccc67cccf585d93 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 1 Sep 1995 22:25:08 +0000 Subject: Fri Sep 1 16:16:12 1995 Roland McGrath * libc-symbols.h (link_warning): Take new first arg SYMBOL; ask for a warning on references to that specific symbol, not the entire containing object file. (stub_warning): Pass symbol name to link_warning. * stdio/gets.c: Pass function name in link_warning invocation. * hurd/intr-msg.c: Treat apparent EINTR return from msg trap like MACH_SEND_INTERRUPTED. That indicates interrupt_operation was sent, but failed. * stdlib/msort.c: Include memcopy.h. (msort_with_tmp): If operating on aligned op_t words, use direct word fetches and stores. * sysdeps/i386/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Add missing backslash. --- posix/regex.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'posix/regex.c') diff --git a/posix/regex.c b/posix/regex.c index 8c4ab38954..db0ebc23a5 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -3040,7 +3040,7 @@ re_compile_fastmap (bufp) case at_dot: case after_dot: continue; -#endif /* not emacs */ +#endif /* emacs */ case no_op: @@ -3279,6 +3279,17 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) range = 1; } +#ifdef emacs + /* In a forward search for something that starts with \=. + don't keep searching past point. */ + if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0) + { + range = PT - startpos; + if (range <= 0) + return -1; + } +#endif /* emacs */ + /* Update the fastmap now if not correct already. */ if (fastmap && !bufp->fastmap_accurate) if (re_compile_fastmap (bufp) == -2) @@ -4682,13 +4693,6 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) if (PTR_CHAR_POS ((unsigned char *) d) <= point) goto fail; break; -#if 0 /* not emacs19 */ - case at_dot: - DEBUG_PRINT1 ("EXECUTING at_dot.\n"); - if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point) - goto fail; - break; -#endif /* not emacs19 */ case syntaxspec: DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt); -- cgit v1.2.3