Module Name: src
Committed By: rillig
Date: Sat Jan 8 09:55:33 UTC 2022
Modified Files:
src/usr.bin/make: parse.c
Log Message:
make: constify UnescapeBackslash, fix typo in comment
No binary change.
To generate a diff of this commit:
cvs rdiff -u -r1.637 -r1.638 src/usr.bin/make/parse.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.637 src/usr.bin/make/parse.c:1.638
--- src/usr.bin/make/parse.c:1.637 Fri Jan 7 22:08:09 2022
+++ src/usr.bin/make/parse.c Sat Jan 8 09:55:32 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.637 2022/01/07 22:08:09 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.638 2022/01/08 09:55:32 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.637 2022/01/07 22:08:09 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.638 2022/01/08 09:55:32 rillig Exp $");
/*
* A file being read.
@@ -2376,7 +2376,7 @@ ParseRawLine(IncludedFile *curFile, char
static void
UnescapeBackslash(char *line, char *start)
{
- char *src = start;
+ const char *src = start;
char *dst = start;
char *spaceStart = line;
@@ -2400,7 +2400,7 @@ UnescapeBackslash(char *line, char *star
if (ch == '#' && line[0] != '\t')
*dst++ = ch;
else if (ch == '\n') {
- pp_skip_hspace(&src);
+ cpp_skip_hspace(&src);
*dst++ = ' ';
} else {
/* Leave '\\' in the buffer for later. */
@@ -2551,8 +2551,8 @@ ParseForLoop(const char *line)
* leaving only variable assignments, other directives, dependency lines
* and shell commands to the caller.
*
- * Return a line without without trailing whitespace, or NULL for EOF. The
- * caller must not free the returned line.
+ * Return a line without trailing whitespace, or NULL for EOF. The returned
+ * string will be freed at the end of including the file.
*/
static char *
ReadHighLevelLine(void)