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(1): inline ShellWriter_PrintCmd



details:   https://anonhg.NetBSD.org/src/rev/f1e15fc5f23d
branches:  trunk
changeset: 957819:f1e15fc5f23d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Dec 12 10:45:24 2020 +0000

description:
make(1): inline ShellWriter_PrintCmd

The parameter name escCmd was wrong for the call in JobPrintCommand.

diffstat:

 usr.bin/make/job.c |  14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diffs (49 lines):

diff -r a8d806c58f6c -r f1e15fc5f23d usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sat Dec 12 10:40:42 2020 +0000
+++ b/usr.bin/make/job.c        Sat Dec 12 10:45:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.375 2020/12/12 10:40:42 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.376 2020/12/12 10:45:24 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*     "@(#)job.c      8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.375 2020/12/12 10:40:42 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.376 2020/12/12 10:45:24 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -764,12 +764,6 @@
 }
 
 static void
-ShellWriter_PrintCmd(ShellWriter *wr, const char *tmpl, const char *escCmd)
-{
-       ShellWriter_PrintFmt(wr, tmpl, escCmd);
-}
-
-static void
 ShellWriter_Println(ShellWriter *wr, const char *line)
 {
        ShellWriter_PrintFmt(wr, "%s\n", line);
@@ -785,7 +779,7 @@
 static void
 ShellWriter_EchoCmd(ShellWriter *wr, const char *escCmd)
 {
-       ShellWriter_PrintCmd(wr, shell->echoTmpl, escCmd);
+       ShellWriter_PrintFmt(wr, shell->echoTmpl, escCmd);
 }
 
 static void
@@ -965,7 +959,7 @@
        if (DEBUG(SHELL) && strcmp(shellName, "sh") == 0)
                ShellWriter_TraceOn(wr);
 
-       ShellWriter_PrintCmd(wr, cmdTemplate, xcmd);
+       ShellWriter_PrintFmt(wr, cmdTemplate, xcmd);
        free(xcmdStart);
        free(escCmd);
        if (cmdFlags.ignerr) {



Home | Main Index | Thread Index | Old Index