aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-08-28 15:03:29 +0000
committerGerd Moellmann2000-08-28 15:03:29 +0000
commita847af86f51bca4cc75993a6c7c3fbee952391a9 (patch)
tree6283a1520131661766bf5b9b843361d31d9fda46 /src
parentdb2144080c0b08b93ffaa2579fe7b66863688eff (diff)
downloademacs-a847af86f51bca4cc75993a6c7c3fbee952391a9.tar.gz
emacs-a847af86f51bca4cc75993a6c7c3fbee952391a9.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/callint.c10
-rw-r--r--src/doc.c17
-rw-r--r--src/editfns.c11
-rw-r--r--src/emacs.c9
4 files changed, 35 insertions, 12 deletions
diff --git a/src/callint.c b/src/callint.c
index 09c22a987c1..88743b83980 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -27,7 +27,13 @@ Boston, MA 02111-1307, USA. */
27#include "window.h" 27#include "window.h"
28#include "mocklisp.h" 28#include "mocklisp.h"
29 29
30extern char *index (); 30#ifdef HAVE_STRING_H
31#include <string.h>
32#endif
33
34#ifdef HAVE_STRINGS_H
35#include <strings.h>
36#endif
31 37
32extern Lisp_Object Qcursor_in_echo_area; 38extern Lisp_Object Qcursor_in_echo_area;
33 39
@@ -449,7 +455,7 @@ supply if the command inquires which events were used to invoke it.")
449 { 455 {
450 strncpy (prompt1, tem + 1, sizeof prompt1 - 1); 456 strncpy (prompt1, tem + 1, sizeof prompt1 - 1);
451 prompt1[sizeof prompt1 - 1] = 0; 457 prompt1[sizeof prompt1 - 1] = 0;
452 tem1 = index (prompt1, '\n'); 458 tem1 = (char *) index (prompt1, '\n');
453 if (tem1) *tem1 = 0; 459 if (tem1) *tem1 = 0;
454 /* Fill argstrings with a vector of C strings 460 /* Fill argstrings with a vector of C strings
455 corresponding to the Lisp strings in visargs. */ 461 corresponding to the Lisp strings in visargs. */
diff --git a/src/doc.c b/src/doc.c
index 2cff57bb81d..52545c1f3fc 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -41,12 +41,18 @@ Boston, MA 02111-1307, USA. */
41#include "keyboard.h" 41#include "keyboard.h"
42#include "charset.h" 42#include "charset.h"
43 43
44#ifdef HAVE_STRING_H
45#include <string.h>
46#endif
47
48#ifdef HAVE_STRINGS_H
49#include <strings.h>
50#endif
51
44Lisp_Object Vdoc_file_name, Vhelp_manyarg_func_alist; 52Lisp_Object Vdoc_file_name, Vhelp_manyarg_func_alist;
45 53
46Lisp_Object Qfunction_documentation; 54Lisp_Object Qfunction_documentation;
47 55
48extern char *index ();
49
50extern Lisp_Object Voverriding_local_map; 56extern Lisp_Object Voverriding_local_map;
51 57
52/* For VMS versions with limited file name syntax, 58/* For VMS versions with limited file name syntax,
@@ -228,9 +234,9 @@ get_doc_string (filepos, unibyte, definition)
228 if (!nread) 234 if (!nread)
229 break; 235 break;
230 if (p == get_doc_string_buffer) 236 if (p == get_doc_string_buffer)
231 p1 = index (p + offset, '\037'); 237 p1 = (char *) index (p + offset, '\037');
232 else 238 else
233 p1 = index (p, '\037'); 239 p1 = (char *) index (p, '\037');
234 if (p1) 240 if (p1)
235 { 241 {
236 *p1 = 0; 242 *p1 = 0;
@@ -475,7 +481,6 @@ when doc strings are referred to later in the dumped Emacs.")
475 register char *p, *end; 481 register char *p, *end;
476 Lisp_Object sym, fun, tem; 482 Lisp_Object sym, fun, tem;
477 char *name; 483 char *name;
478 extern char *index ();
479 484
480#ifndef CANNOT_DUMP 485#ifndef CANNOT_DUMP
481 if (NILP (Vpurify_flag)) 486 if (NILP (Vpurify_flag))
@@ -532,7 +537,7 @@ when doc strings are referred to later in the dumped Emacs.")
532 /* p points to ^_Ffunctionname\n or ^_Vvarname\n. */ 537 /* p points to ^_Ffunctionname\n or ^_Vvarname\n. */
533 if (p != end) 538 if (p != end)
534 { 539 {
535 end = index (p, '\n'); 540 end = (char *) index (p, '\n');
536 sym = oblookup (Vobarray, p + 2, 541 sym = oblookup (Vobarray, p + 2,
537 multibyte_chars_in_text (p + 2, end - p - 2), 542 multibyte_chars_in_text (p + 2, end - p - 2),
538 end - p - 2); 543 end - p - 2);
diff --git a/src/editfns.c b/src/editfns.c
index b4044d2bb78..c8011c8eb3e 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -42,6 +42,14 @@ Boston, MA 02111-1307, USA. */
42 42
43#include "systime.h" 43#include "systime.h"
44 44
45#ifdef HAVE_STRING_H
46#include <string.h>
47#endif
48
49#ifdef HAVE_STRINGS_H
50#include <strings.h>
51#endif
52
45#define min(a, b) ((a) < (b) ? (a) : (b)) 53#define min(a, b) ((a) < (b) ? (a) : (b))
46#define max(a, b) ((a) > (b) ? (a) : (b)) 54#define max(a, b) ((a) > (b) ? (a) : (b))
47 55
@@ -1138,7 +1146,6 @@ name, or nil if there is no such user.")
1138{ 1146{
1139 struct passwd *pw; 1147 struct passwd *pw;
1140 register unsigned char *p, *q; 1148 register unsigned char *p, *q;
1141 extern char *index ();
1142 Lisp_Object full; 1149 Lisp_Object full;
1143 1150
1144 if (NILP (uid)) 1151 if (NILP (uid))
@@ -3018,8 +3025,6 @@ Use %% to put a single % into the output.")
3018 int start, end; 3025 int start, end;
3019 } *info = 0; 3026 } *info = 0;
3020 3027
3021 extern char *index ();
3022
3023 /* It should not be necessary to GCPRO ARGS, because 3028 /* It should not be necessary to GCPRO ARGS, because
3024 the caller in the interpreter should take care of that. */ 3029 the caller in the interpreter should take care of that. */
3025 3030
diff --git a/src/emacs.c b/src/emacs.c
index 8527736cb03..e91fca2eb01 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -60,6 +60,14 @@ Boston, MA 02111-1307, USA. */
60#include <sys/resource.h> 60#include <sys/resource.h>
61#endif 61#endif
62 62
63#ifdef HAVE_STRING_H
64#include <string.h>
65#endif
66
67#ifdef HAVE_STRINGS_H
68#include <strings.h>
69#endif
70
63#ifndef O_RDWR 71#ifndef O_RDWR
64#define O_RDWR 2 72#define O_RDWR 2
65#endif 73#endif
@@ -73,7 +81,6 @@ Boston, MA 02111-1307, USA. */
73 81
74extern void malloc_warning P_ ((char *)); 82extern void malloc_warning P_ ((char *));
75extern void set_time_zone_rule P_ ((char *)); 83extern void set_time_zone_rule P_ ((char *));
76extern char *index P_ ((const char *, int));
77 84
78/* Make these values available in GDB, which doesn't see macros. */ 85/* Make these values available in GDB, which doesn't see macros. */
79 86