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): move PrintAddr to where it belongs



details:   https://anonhg.NetBSD.org/src/rev/672d719110c8
branches:  trunk
changeset: 954853:672d719110c8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Sep 12 15:15:51 2020 +0000

description:
make(1): move PrintAddr to where it belongs

diffstat:

 usr.bin/make/main.c    |  13 +++----------
 usr.bin/make/nonints.h |   3 +--
 usr.bin/make/suff.c    |  15 ++++++++++++---
 3 files changed, 16 insertions(+), 15 deletions(-)

diffs (100 lines):

diff -r 139d3cadbaf5 -r 672d719110c8 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sat Sep 12 15:10:55 2020 +0000
+++ b/usr.bin/make/main.c       Sat Sep 12 15:15:51 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.332 2020/09/11 17:32:36 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.333 2020/09/12 15:15:51 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.332 2020/09/11 17:32:36 rillig Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.333 2020/09/12 15:15:51 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.332 2020/09/11 17:32:36 rillig Exp $");
+__RCSID("$NetBSD: main.c,v 1.333 2020/09/12 15:15:51 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1968,13 +1968,6 @@
     return rp ? resolved : NULL;
 }
 
-int
-PrintAddr(void *a, void *b)
-{
-    printf("%lx ", (unsigned long) a);
-    return b ? 0 : 0;
-}
-
 
 static int
 addErrorCMD(void *cmdp, void *gnp)
diff -r 139d3cadbaf5 -r 672d719110c8 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sat Sep 12 15:10:55 2020 +0000
+++ b/usr.bin/make/nonints.h    Sat Sep 12 15:15:51 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.109 2020/09/12 15:10:55 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.110 2020/09/12 15:15:51 rillig Exp $     */
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -113,7 +113,6 @@
 void Fatal(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
 void Punt(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD;
 void DieHorribly(void) MAKE_ATTR_DEAD;
-int PrintAddr(void *, void *);
 void Finish(int) MAKE_ATTR_DEAD;
 int eunlink(const char *);
 void execError(const char *, const char *);
diff -r 139d3cadbaf5 -r 672d719110c8 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sat Sep 12 15:10:55 2020 +0000
+++ b/usr.bin/make/suff.c       Sat Sep 12 15:15:51 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.148 2020/09/12 14:41:00 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.148 2020/09/12 14:41:00 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)suff.c     8.4 (Berkeley) 3/21/94";
 #else
-__RCSID("$NetBSD: suff.c,v 1.148 2020/09/12 14:41:00 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.149 2020/09/12 15:15:51 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -948,6 +948,15 @@
 
          /********** Implicit Source Search Functions *********/
 
+#ifdef DEBUG_SRC
+static int
+PrintAddr(void *a, void *b MAKE_ATTR_UNUSED)
+{
+    printf("%lx ", (unsigned long) a);
+    return 0;
+}
+#endif
+
 /* Add a suffix as a Src structure to the given list with its parent
  * being the given Src structure. If the suffix is the null suffix,
  * the prefix is used unaltered as the file name in the Src structure.



Home | Main Index | Thread Index | Old Index