Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make PR bin/17732: Allow make to understand escaped ...
details: https://anonhg.NetBSD.org/src/rev/2c89c78d4295
branches: trunk
changeset: 582081:2c89c78d4295
user: rpaulo <rpaulo%NetBSD.org@localhost>
date: Wed Jun 15 22:26:54 2005 +0000
description:
PR bin/17732: Allow make to understand escaped comments.
Approved by sjg, christos and hubertf.
diffstat:
usr.bin/make/parse.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 4241d258d989 -r 2c89c78d4295 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Wed Jun 15 22:08:08 2005 +0000
+++ b/usr.bin/make/parse.c Wed Jun 15 22:26:54 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.99 2005/05/08 00:38:48 christos Exp $ */
+/* $NetBSD: parse.c,v 1.100 2005/06/15 22:26:54 rpaulo Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.99 2005/05/08 00:38:48 christos Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.100 2005/06/15 22:26:54 rpaulo Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.99 2005/05/08 00:38:48 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.100 2005/06/15 22:26:54 rpaulo Exp $");
#endif
#endif /* not lint */
#endif
@@ -2552,6 +2552,14 @@
*/
do {
c = ParseReadc();
+ /*
+ * If we found a backslash not escaped
+ * itself it means that the comment is
+ * going to continue in the next line.
+ */
+ if (c == '\\' && lastc != c)
+ ParseReadc();
+ lastc = c;
} while ((c != '\n') && (c != EOF));
goto line_read;
} else {
Home |
Main Index |
Thread Index |
Old Index