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 PrintNode



details:   https://anonhg.NetBSD.org/src/rev/a87284d9c436
branches:  trunk
changeset: 1014607:a87284d9c436
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Sep 27 12:10:51 2020 +0000

description:
make(1): inline PrintNode

Having a separate function had only been necessary for Lst_ForEachUntil.

diffstat:

 usr.bin/make/targ.c |  18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)

diffs (51 lines):

diff -r 9386a9050fe9 -r a87284d9c436 usr.bin/make/targ.c
--- a/usr.bin/make/targ.c       Sun Sep 27 12:05:04 2020 +0000
+++ b/usr.bin/make/targ.c       Sun Sep 27 12:10:51 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: targ.c,v 1.104 2020/09/27 11:53:03 rillig Exp $        */
+/*     $NetBSD: targ.c,v 1.105 2020/09/27 12:10:51 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -121,7 +121,7 @@
 #include         "dir.h"
 
 /*     "@(#)targ.c     8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: targ.c,v 1.104 2020/09/27 11:53:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: targ.c,v 1.105 2020/09/27 12:10:51 rillig Exp $");
 
 static GNodeList *allTargets;  /* the list of all targets found so far */
 #ifdef CLEANUP
@@ -435,8 +435,9 @@
     }
 }
 
-static void
-PrintNode(GNode *gn, int pass)
+/* Print the contents of a node. */
+void
+Targ_PrintNode(GNode *gn, int pass)
 {
     fprintf(debug_file, "# %s%s", gn->name, gn->cohort_num);
     GNode_FprintDetails(debug_file, ", ", gn, "\n");
@@ -495,19 +496,12 @@
     }
 }
 
-/* Print the contents of a node. */
-void
-Targ_PrintNode(GNode *gn, int pass)
-{
-    PrintNode(gn, pass);
-}
-
 void
 Targ_PrintNodes(GNodeList *gnodes, int pass)
 {
     GNodeListNode *ln;
     for (ln = gnodes->first; ln != NULL; ln = ln->next)
-       PrintNode(ln->datum, pass);
+       Targ_PrintNode(ln->datum, pass);
 }
 
 /* Print only those targets that are just a source. */



Home | Main Index | Thread Index | Old Index