version 1.6, 1999/12/08 23:09:46 |
version 1.7, 2001/09/08 00:12:40 |
|
|
for ( ; *envp; envp++) { |
for ( ; *envp; envp++) { |
if ((p = strchr(*envp, '=')) == NULL) |
if ((p = strchr(*envp, '=')) == NULL) |
continue; |
continue; |
|
if( p == *envp ) /* no left hand side name in env string */ |
|
continue; |
*p++ = 0; /* split into two strings at = */ |
*p++ = 0; /* split into two strings at = */ |
if (is_number(p)) |
if (is_number(p)) |
setsymtab(*envp, p, atof(p), STR|NUM, ENVtab); |
setsymtab(*envp, p, atof(p), STR|NUM, ENVtab); |
|
|
return(p); |
return(p); |
} |
} |
|
|
char *qstring(char *s, int delim) /* collect string up to next delim */ |
char *qstring(char *is, int delim) /* collect string up to next delim */ |
{ |
{ |
char *os = s; |
char *os = is; |
int c, n; |
int c, n; |
char *buf, *bp; |
uschar *s = (uschar *) is; |
|
uschar *buf, *bp; |
|
|
if ((buf = (char *) malloc(strlen(s)+3)) == NULL) |
if ((buf = (uschar *) malloc(strlen(s)+3)) == NULL) |
FATAL( "out of space in qstring(%s)", s); |
FATAL( "out of space in qstring(%s)", s); |
for (bp = buf; (c = *s) != delim; s++) { |
for (bp = buf; (c = *s) != delim; s++) { |
if (c == '\n') |
if (c == '\n') |
|
|
} |
} |
} |
} |
*bp++ = 0; |
*bp++ = 0; |
return buf; |
return (char *) buf; |
} |
} |