diff src/callint.c @ 109358:a9586dc942d5

Merge from mainline.
author Katsumi Yamaoka <katsumi@flagship2>
date Mon, 12 Jul 2010 13:21:11 +0000
parents 8f3464b85afb
children 228a5fa4eda0
line wrap: on
line diff
--- a/src/callint.c	Sat Jul 10 10:34:43 2010 +0000
+++ b/src/callint.c	Mon Jul 12 13:21:11 2010 +0000
@@ -29,10 +29,6 @@
 #include "window.h"
 #include "keymap.h"
 
-#ifdef HAVE_INDEX
-extern char *index (const char *, int);
-#endif
-
 extern Lisp_Object Qcursor_in_echo_area;
 extern Lisp_Object Qfile_directory_p;
 extern Lisp_Object Qonly;
@@ -469,7 +465,7 @@
 	j += 2;
       else
 	j++;
-      tem = (unsigned char *) index (tem, '\n');
+      tem = (unsigned char *) strchr (tem, '\n');
       if (tem)
 	++tem;
       else
@@ -500,11 +496,11 @@
     {
       strncpy (prompt1, tem + 1, sizeof prompt1 - 1);
       prompt1[sizeof prompt1 - 1] = 0;
-      tem1 = (char *) index (prompt1, '\n');
+      tem1 = strchr (prompt1, '\n');
       if (tem1) *tem1 = 0;
 
       visargs[0] = build_string (prompt1);
-      if (index (prompt1, '%'))
+      if (strchr (prompt1, '%'))
 	callint_message = Fformat (i, visargs);
       else
 	callint_message = visargs[0];
@@ -809,7 +805,7 @@
       if (NILP (visargs[i]) && STRINGP (args[i]))
 	visargs[i] = args[i];
 
-      tem = (unsigned char *) index (tem, '\n');
+      tem = (unsigned char *) strchr (tem, '\n');
       if (tem) tem++;
       else tem = (unsigned char *) "";
     }