diff src/doc.c @ 31225:7930c46bb365

(toplevel) [HAVE_STRING_H]: Include string.h. (toplevel) [HAVE_STRINGS_H]: Include strings.h. (index): Remove prototypes which might conflict with non-standard definitions of index/strchr.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 28 Aug 2000 15:03:29 +0000
parents f8e2064c56b1
children 3ecef4a7b3cd
line wrap: on
line diff
--- a/src/doc.c	Mon Aug 28 15:01:58 2000 +0000
+++ b/src/doc.c	Mon Aug 28 15:03:29 2000 +0000
@@ -41,12 +41,18 @@
 #include "keyboard.h"
 #include "charset.h"
 
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
 Lisp_Object Vdoc_file_name, Vhelp_manyarg_func_alist;
 
 Lisp_Object Qfunction_documentation;
 
-extern char *index ();
-
 extern Lisp_Object Voverriding_local_map;
 
 /* For VMS versions with limited file name syntax,
@@ -228,9 +234,9 @@
       if (!nread)
 	break;
       if (p == get_doc_string_buffer)
-	p1 = index (p + offset, '\037');
+	p1 = (char *) index (p + offset, '\037');
       else
-	p1 = index (p, '\037');
+	p1 = (char *) index (p, '\037');
       if (p1)
 	{
 	  *p1 = 0;
@@ -475,7 +481,6 @@
   register char *p, *end;
   Lisp_Object sym, fun, tem;
   char *name;
-  extern char *index ();
 
 #ifndef CANNOT_DUMP
   if (NILP (Vpurify_flag))
@@ -532,7 +537,7 @@
       /* p points to ^_Ffunctionname\n or ^_Vvarname\n.  */
       if (p != end)
 	{
-	  end = index (p, '\n');
+	  end = (char *) index (p, '\n');
 	  sym = oblookup (Vobarray, p + 2,
 			  multibyte_chars_in_text (p + 2, end - p - 2),
 			  end - p - 2);