earlybrowserreborn - Diff between revs 1 and 3

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 1 Rev 3
Line 21... Line 21...
21 static char sccsid[] = "@(#)setenv.c    5.4 (Berkeley) 6/1/90"; 21 static char sccsid[] = "@(#)setenv.c    5.4 (Berkeley) 6/1/90";
22 #endif /* LIBC_SCCS and not lint */ 22 #endif /* LIBC_SCCS and not lint */
23 23
24 #include <stdio.h> 24 #include <stdio.h>
25 #include <sys/types.h> 25 #include <sys/types.h>
26 extern char *malloc(); -  
27 -  
-   26 //extern char *malloc();
-   27 extern char *_findenv(register char *name,int *offset);
28 /* 28 /*
29  * setenv -- 29  * setenv --
30  *      Set the value of the environmental variable "name" to be 30  *      Set the value of the environmental variable "name" to be
31  *      "value".  If rewrite is set, replace any current value. 31  *      "value".  If rewrite is set, replace any current value.
32  */ 32  */
Line 36... Line 36...
36 { 36 {
37         extern char **environ; 37         extern char **environ;
38         static int alloced;                     /* if allocated space before */ 38         static int alloced;                     /* if allocated space before */
39         register char *C; 39         register char *C;
40         int l_value, offset; 40         int l_value, offset;
41         char *_findenv(); -  
42 41
43         if (*value == '=')                      /* no `=' in value */ 42         if (*value == '=')                      /* no `=' in value */
44                 ++value; 43                 ++value;
45         l_value = strlen(value); 44         l_value = strlen(value);
46         if ((C = _findenv(name, &offset))) {    /* find if already exists */ 45         if ((C = _findenv(name, &offset))) {    /* find if already exists */