=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/awk/tran.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/awk/tran.c 1999/12/08 23:09:46 1.6 --- src/usr.bin/awk/tran.c 2001/09/08 00:12:40 1.7 *************** *** 1,4 **** ! /* $OpenBSD: tran.c,v 1.6 1999/12/08 23:09:46 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved --- 1,4 ---- ! /* $OpenBSD: tran.c,v 1.7 2001/09/08 00:12:40 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved *************** *** 127,132 **** --- 127,134 ---- for ( ; *envp; envp++) { if ((p = strchr(*envp, '=')) == NULL) continue; + if( p == *envp ) /* no left hand side name in env string */ + continue; *p++ = 0; /* split into two strings at = */ if (is_number(p)) setsymtab(*envp, p, atof(p), STR|NUM, ENVtab); *************** *** 388,400 **** return(p); } ! char *qstring(char *s, int delim) /* collect string up to next delim */ { ! char *os = s; int c, n; ! char *buf, *bp; ! if ((buf = (char *) malloc(strlen(s)+3)) == NULL) FATAL( "out of space in qstring(%s)", s); for (bp = buf; (c = *s) != delim; s++) { if (c == '\n') --- 390,403 ---- return(p); } ! char *qstring(char *is, int delim) /* collect string up to next delim */ { ! char *os = is; int c, n; ! uschar *s = (uschar *) is; ! uschar *buf, *bp; ! if ((buf = (uschar *) malloc(strlen(s)+3)) == NULL) FATAL( "out of space in qstring(%s)", s); for (bp = buf; (c = *s) != delim; s++) { if (c == '\n') *************** *** 431,435 **** } } *bp++ = 0; ! return buf; } --- 434,438 ---- } } *bp++ = 0; ! return (char *) buf; }