From 2f5222ea2a4d549b4f269c11d34016fc7dc58dde Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Fri, 12 Sep 1997 09:32:20 -0400 Subject: snapshot of project "lynx", label v2-7-1ac_0-64 --- src/LYUtils.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/LYUtils.c') 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 +#ifdef NOTDEFINED #define index strchr #define bcopy(s, d, n) memcpy((d), (s), (n)) +#endif /* NOTDEFINED */ #else /* Not (STDC_HEADERS or USG): */ #include #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) -- cgit 1.4.1-2-gfad0