Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: clean up nitpicks in parse.c
details: https://anonhg.NetBSD.org/src/rev/312ca102a9d9
branches: trunk
changeset: 359469:312ca102a9d9
user: rillig <rillig%NetBSD.org@localhost>
date: Fri Jan 07 08:48:16 2022 +0000
description:
make: clean up nitpicks in parse.c
In PrintLocation, fname is not an iterator, so prefer fname[0] over
*fname.
List stdout and stderr in this order, for consistency with main.c.
No functional change.
diffstat:
usr.bin/make/parse.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diffs (63 lines):
diff -r 45ff2761914b -r 312ca102a9d9 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Fri Jan 07 08:37:23 2022 +0000
+++ b/usr.bin/make/parse.c Fri Jan 07 08:48:16 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.621 2022/01/07 08:37:23 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.622 2022/01/07 08:48:16 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.621 2022/01/07 08:37:23 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.622 2022/01/07 08:48:16 rillig Exp $");
/*
* Structure for a file being read ("included file")
@@ -427,16 +427,11 @@
char dirbuf[MAXPATHLEN + 1];
FStr dir, base;
- if (*fname == '/' || strcmp(fname, "(stdin)") == 0) {
+ if (fname[0] == '/' || strcmp(fname, "(stdin)") == 0) {
(void)fprintf(f, "\"%s\" line %u: ", fname, (unsigned)lineno);
return;
}
- /*
- * Find out which makefile is the culprit. We try ${.PARSEDIR} and
- * apply realpath(3) if not absolute.
- */
-
dir = Var_Value(SCOPE_GLOBAL, ".PARSEDIR");
if (dir.str == NULL)
dir.str = ".";
@@ -494,7 +489,7 @@
ParseVErrorInternal(stderr, fname, lineno, type, fmt, ap);
va_end(ap);
- if (opts.debug_file != stderr && opts.debug_file != stdout) {
+ if (opts.debug_file != stdout && opts.debug_file != stderr) {
va_start(ap, fmt);
ParseVErrorInternal(opts.debug_file, fname, lineno, type,
fmt, ap);
@@ -531,7 +526,7 @@
ParseVErrorInternal(stderr, fname, lineno, type, fmt, ap);
va_end(ap);
- if (opts.debug_file != stderr && opts.debug_file != stdout) {
+ if (opts.debug_file != stdout && opts.debug_file != stderr) {
va_start(ap, fmt);
ParseVErrorInternal(opts.debug_file, fname, lineno, type,
fmt, ap);
@@ -1182,7 +1177,7 @@
* a something and deal with it accordingly.
*/
static void
-ParseDependencySourceSpecial(ParseSpecial special, char *word,
+ParseDependencySourceSpecial(ParseSpecial special, const char *word,
SearchPathList *paths)
{
switch (special) {
Home |
Main Index |
Thread Index |
Old Index