=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/parse.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/make/parse.c 1996/09/02 16:04:17 1.9 --- src/usr.bin/make/parse.c 1996/09/21 05:03:37 1.10 *************** *** 1,5 **** ! /* $OpenBSD: parse.c,v 1.9 1996/09/02 16:04:17 briggs Exp $ */ ! /* $NetBSD: parse.c,v 1.24 1996/08/13 16:42:13 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. --- 1,5 ---- ! /* $OpenBSD: parse.c,v 1.10 1996/09/21 05:03:37 briggs Exp $ */ ! /* $NetBSD: parse.c,v 1.25 1996/09/13 04:22:09 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. *************** *** 43,49 **** #if 0 static char sccsid[] = "@(#)parse.c 5.18 (Berkeley) 2/19/91"; #else ! static char rcsid[] = "$NetBSD: parse.c,v 1.24 1996/08/13 16:42:13 christos Exp $"; #endif #endif /* not lint */ --- 43,49 ---- #if 0 static char sccsid[] = "@(#)parse.c 5.18 (Berkeley) 2/19/91"; #else ! static char rcsid[] = "$NetBSD: parse.c,v 1.25 1996/09/13 04:22:09 christos Exp $"; #endif #endif /* not lint */ *************** *** 2018,2025 **** * special char. */ while ((c != '.') && (c != EOF)) { ! while (((c != '\n') || (lastc == '\\')) && (c != EOF)) ! { /* * Advance to next unescaped newline */ --- 2018,2024 ---- * special char. */ while ((c != '.') && (c != EOF)) { ! while (((c != '\n') || (lastc == '\\')) && (c != EOF)) { /* * Advance to next unescaped newline */ *************** *** 2045,2054 **** */ buf = Buf_Init (MAKE_BSIZE); if (c != '\n') { do { ! Buf_AddByte (buf, (Byte)c); c = ParseReadc(); ! } while ((c != '\n') && (c != EOF)); } lineno++; --- 2044,2061 ---- */ buf = Buf_Init (MAKE_BSIZE); if (c != '\n') { + lastc = '\0'; do { ! if (lastc != '\0' && lastc != '\n') ! Buf_AddByte (buf, (Byte) lastc); ! if ((lastc = c) == '\n') ! lineno++; c = ParseReadc(); ! if (c == '\n' && lastc == '\\') ! lastc = '\0'; ! } while (((c != '\n') || (lastc == '\0')) && (c != EOF)); ! if (lastc != '\0' && lastc != '\n') ! Buf_AddByte (buf, (Byte) lastc); } lineno++; *************** *** 2435,2441 **** continue; } else { Parse_Error (PARSE_FATAL, ! "Unassociated shell command \"%.20s\"", cp); } } --- 2442,2448 ---- continue; } else { Parse_Error (PARSE_FATAL, ! "Unassociated shell command \"%s\"", cp); } }