about summary refs log tree commit diff stats
path: root/src/LYUtils.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1997-09-12 09:32:20 -0400
committerThomas E. Dickey <dickey@invisible-island.net>1997-09-12 09:32:20 -0400
commit2f5222ea2a4d549b4f269c11d34016fc7dc58dde (patch)
treea71f2059819076b2adf4922b25d7cbe7d217c3fe /src/LYUtils.c
parent549ec595d1da7693d5f7730e63f539cc8452307f (diff)
downloadlynx-snapshots-2f5222ea2a4d549b4f269c11d34016fc7dc58dde.tar.gz
snapshot of project "lynx", label v2-7-1ac_0-64
Diffstat (limited to 'src/LYUtils.c')
-rw-r--r--src/LYUtils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/LYUtils.c b/src/LYUtils.c
index 27898c31..d95a0635 100644
--- a/src/LYUtils.c
+++ b/src/LYUtils.c
@@ -5238,8 +5238,10 @@ extern int errno;
 
 #if defined(STDC_HEADERS) || defined(USG)
 #include <string.h>
+#ifdef NOTDEFINED
 #define index strchr
 #define bcopy(s, d, n) memcpy((d), (s), (n))
+#endif /* NOTDEFINED */
 #else /* Not (STDC_HEADERS or USG): */
 #include <strings.h>
 #endif /* STDC_HEADERS or USG */
@@ -5260,7 +5262,7 @@ extern char **environ;
 PUBLIC int putenv ARGS1(
 	CONST char *,	string)
 {
-  char *name_end = index (string, '=');
+  char *name_end = strchr(string, '=');
   register size_t size;
   register char **ep;
 
@@ -5291,10 +5293,10 @@ PUBLIC int putenv ARGS1(
   if (*ep == NULL)
     {
       static char **last_environ = NULL;
-      char **new_environ = (char **) malloc ((size + 2)  * sizeof (char *));
+      char **new_environ = (char **) malloc ((size + 2) * sizeof (char *));
       if (new_environ == NULL)
 	return -1;
-      (void) bcopy ((char *) environ, (char *)  new_environ, size * sizeof (char *));
+      (void) memcpy((char *)new_environ, (char *)environ, size * sizeof(char *));
       new_environ[size] = (char *) string;
       new_environ[size + 1] = NULL;
       if (last_environ != NULL)