Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh In the older debug code (not using the new macros add...



details:   https://anonhg.NetBSD.org/src/rev/a4f907a86929
branches:  trunk
changeset: 363959:a4f907a86929
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Aug 18 03:09:37 2018 +0000

description:
In the older debug code (not using the new macros added in the
previous rev) the two values (node name, and node number) were
arbitrarily printed in different formats and orders (depending
upon my mood at the time I guess...)   The new macros will standardise
that usage (in the debug output) once some use of them actually begins.

When the macros were added, I arbitrarily copied the format of one
use I was looking at at that instant (the one which inspired the change),
but after gazing at DEBUG mode output over the intervening time, I
have concluded that I did not pick the easiest to read/follow format.

So, even before they are used, change the style...    Also, conform
to standard PRIxxxx macro style by omitting the leading '%'.

NFC (since they aren't used at all, anywhere, yet, not even the
possibility of anything changing!)

diffstat:

 bin/sh/mknodenames.sh |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 6a0adaf4bd48 -r a4f907a86929 bin/sh/mknodenames.sh
--- a/bin/sh/mknodenames.sh     Fri Aug 17 20:16:07 2018 +0000
+++ b/bin/sh/mknodenames.sh     Sat Aug 18 03:09:37 2018 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mknodenames.sh,v 1.5 2018/08/16 15:02:05 kre Exp $
+# $NetBSD: mknodenames.sh,v 1.6 2018/08/18 03:09:37 kre Exp $
 
 # Use this script however you like, but it would be amazing if
 # it has any purpose other than as part of building the shell...
@@ -56,13 +56,13 @@
 echo '#define NODETYPENAME(type) \'
 echo ' ((unsigned)(type) <= '"${MAX}"' ? NodeNames[(type)] : "??OOR??")'
 echo
-echo '#define NODETYPE(type)   (type), NODETYPENAME(type)'
-echo '#define PRIdsNT          "%d(%s)"'
+echo '#define NODETYPE(type)   NODETYPENAME(type), (type)'
+echo '#define PRIdsNT          "s(%d)"'
 echo
 echo '#else /* DEBUG */'
 echo
 echo '#define NODETYPE(type)   (type)'
-echo '#define PRIdsNT          "%d"'
+echo '#define PRIdsNT          "d"'
 echo
 echo '#endif /* DEBUG */'
 echo



Home | Main Index | Thread Index | Old Index