version 1.9, 1996/09/02 16:04:17 |
version 1.10, 1996/09/21 05:03:37 |
|
|
/* $OpenBSD$ */ |
/* $OpenBSD$ */ |
/* $NetBSD: parse.c,v 1.24 1996/08/13 16:42:13 christos 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. |
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California. |
|
|
#if 0 |
#if 0 |
static char sccsid[] = "@(#)parse.c 5.18 (Berkeley) 2/19/91"; |
static char sccsid[] = "@(#)parse.c 5.18 (Berkeley) 2/19/91"; |
#else |
#else |
static char rcsid[] = "$NetBSD: parse.c,v 1.24 1996/08/13 16:42:13 christos Exp $"; |
static char rcsid[] = "$NetBSD: parse.c,v 1.25 1996/09/13 04:22:09 christos Exp $"; |
#endif |
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
|
|
* special char. |
* special char. |
*/ |
*/ |
while ((c != '.') && (c != EOF)) { |
while ((c != '.') && (c != EOF)) { |
while (((c != '\n') || (lastc == '\\')) && (c != EOF)) |
while (((c != '\n') || (lastc == '\\')) && (c != EOF)) { |
{ |
|
/* |
/* |
* Advance to next unescaped newline |
* Advance to next unescaped newline |
*/ |
*/ |
|
|
*/ |
*/ |
buf = Buf_Init (MAKE_BSIZE); |
buf = Buf_Init (MAKE_BSIZE); |
if (c != '\n') { |
if (c != '\n') { |
|
lastc = '\0'; |
do { |
do { |
Buf_AddByte (buf, (Byte)c); |
if (lastc != '\0' && lastc != '\n') |
|
Buf_AddByte (buf, (Byte) lastc); |
|
if ((lastc = c) == '\n') |
|
lineno++; |
c = ParseReadc(); |
c = ParseReadc(); |
} while ((c != '\n') && (c != EOF)); |
if (c == '\n' && lastc == '\\') |
|
lastc = '\0'; |
|
} while (((c != '\n') || (lastc == '\0')) && (c != EOF)); |
|
if (lastc != '\0' && lastc != '\n') |
|
Buf_AddByte (buf, (Byte) lastc); |
} |
} |
lineno++; |
lineno++; |
|
|
|
|
continue; |
continue; |
} else { |
} else { |
Parse_Error (PARSE_FATAL, |
Parse_Error (PARSE_FATAL, |
"Unassociated shell command \"%.20s\"", |
"Unassociated shell command \"%s\"", |
cp); |
cp); |
} |
} |
} |
} |