about summary refs log tree commit diff
path: root/posix/regex.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-09-01 22:25:08 +0000
committerRoland McGrath <roland@gnu.org>1995-09-01 22:25:08 +0000
commit44c8d1a2a8775ad8c67fa1c46ccc67cccf585d93 (patch)
treec77e32c88b64caccdd673fc54efdba189361a6e6 /posix/regex.c
parente3726b056b3b1cfde7019e29d5d3c50ce70e08e9 (diff)
downloadglibc-44c8d1a2a8775ad8c67fa1c46ccc67cccf585d93.tar.gz
glibc-44c8d1a2a8775ad8c67fa1c46ccc67cccf585d93.tar.xz
glibc-44c8d1a2a8775ad8c67fa1c46ccc67cccf585d93.zip
Fri Sep 1 16:16:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
	* 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.
Diffstat (limited to 'posix/regex.c')
-rw-r--r--posix/regex.c20
1 files changed, 12 insertions, 8 deletions
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);