Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/usr.bin/make Pull up revision 1.100 (requested by rpaulo ...



details:   https://anonhg.NetBSD.org/src/rev/73172057695a
branches:  netbsd-3
changeset: 576247:73172057695a
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Jun 16 09:35:23 2005 +0000

description:
Pull up revision 1.100 (requested by rpaulo in ticket #458):
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 2278094ab775 -r 73172057695a usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Thu Jun 16 09:34:02 2005 +0000
+++ b/usr.bin/make/parse.c      Thu Jun 16 09:35:23 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.97 2005/02/16 15:11:52 christos Exp $      */
+/*     $NetBSD: parse.c,v 1.97.2.1 2005/06/16 09:35:23 tron Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.97 2005/02/16 15:11:52 christos Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.97.2.1 2005/06/16 09:35:23 tron 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.97 2005/02/16 15:11:52 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.97.2.1 2005/06/16 09:35:23 tron 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