=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/parse.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/make/parse.c 1999/10/05 22:08:07 1.21 --- src/usr.bin/make/parse.c 1999/11/10 14:00:54 1.22 *************** *** 1,4 **** ! /* $OpenBSD: parse.c,v 1.21 1999/10/05 22:08:07 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: parse.c,v 1.22 1999/11/10 14:00:54 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* *************** *** 43,49 **** #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: parse.c,v 1.21 1999/10/05 22:08:07 espie Exp $"; #endif #endif /* not lint */ --- 43,49 ---- #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else ! static char rcsid[] = "$OpenBSD: parse.c,v 1.22 1999/11/10 14:00:54 espie Exp $"; #endif #endif /* not lint */ *************** *** 2109,2115 **** buf = Buf_Init(MAKE_BSIZE); ! do { Buf_Discard(buf, lineLength); lastc = '\0'; --- 2109,2115 ---- buf = Buf_Init(MAKE_BSIZE); ! for (;;) { Buf_Discard(buf, lineLength); lastc = '\0'; *************** *** 2129,2144 **** lastc = c; } if (c == EOF) { Parse_Error(PARSE_FATAL, "Unclosed conditional/for loop"); Buf_Destroy(buf, TRUE); return((char *)NULL); } ! lineno++; ! Buf_AddByte(buf, (Byte)'\0'); ! line = (char *)Buf_GetAll(buf, &lineLength); ! } while (skip == 1 && line[0] != '.'); Buf_Destroy(buf, FALSE); return line; --- 2129,2150 ---- lastc = c; } + Buf_AddByte(buf, (Byte)'\0'); + line = (char *)Buf_GetAll(buf, &lineLength); + lineno++; + /* allow for non-newline terminated lines while skipping */ + if (line[0] == '.') + break; + if (c == EOF) { Parse_Error(PARSE_FATAL, "Unclosed conditional/for loop"); Buf_Destroy(buf, TRUE); return((char *)NULL); } + if (skip == 0) + break; ! } Buf_Destroy(buf, FALSE); return line;