Source-Changes-HG archive

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

[src/trunk]: src/bin/sh DEBUG only changes. Convert the TRACE() calls in the...



details:   https://anonhg.NetBSD.org/src/rev/6496016e83ac
branches:  trunk
changeset: 825248:6496016e83ac
user:      kre <kre%NetBSD.org@localhost>
date:      Wed Jul 05 20:00:27 2017 +0000

description:
DEBUG only changes.  Convert the TRACE() calls in the remaining files
that still used it to the new format.   NFC.

diffstat:

 bin/sh/cd.c    |   6 +++---
 bin/sh/error.c |  13 +++++++------
 bin/sh/main.c  |   9 ++++-----
 bin/sh/var.c   |   6 +++---
 4 files changed, 17 insertions(+), 17 deletions(-)

diffs (126 lines):

diff -r ac6acba3c49e -r 6496016e83ac bin/sh/cd.c
--- a/bin/sh/cd.c       Wed Jul 05 19:58:10 2017 +0000
+++ b/bin/sh/cd.c       Wed Jul 05 20:00:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.49 2017/06/17 04:19:12 kre Exp $      */
+/*     $NetBSD: cd.c,v 1.50 2017/07/05 20:00:27 kre Exp $      */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)cd.c       8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: cd.c,v 1.49 2017/06/17 04:19:12 kre Exp $");
+__RCSID("$NetBSD: cd.c,v 1.50 2017/07/05 20:00:27 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -164,7 +164,7 @@
        int first;
        int badstat;
 
-       TRACE(("docd(\"%s\", %d) called\n", dest, print));
+       CTRACE(DBG_CMDS, ("docd(\"%s\", %d) called\n", dest, print));
 
        /*
         *  Check each component of the path. If we find a symlink or
diff -r ac6acba3c49e -r 6496016e83ac bin/sh/error.c
--- a/bin/sh/error.c    Wed Jul 05 19:58:10 2017 +0000
+++ b/bin/sh/error.c    Wed Jul 05 20:00:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: error.c,v 1.39 2016/06/01 02:50:02 kre Exp $   */
+/*     $NetBSD: error.c,v 1.40 2017/07/05 20:00:27 kre Exp $   */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)error.c    8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: error.c,v 1.39 2016/06/01 02:50:02 kre Exp $");
+__RCSID("$NetBSD: error.c,v 1.40 2017/07/05 20:00:27 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -159,11 +159,12 @@
 
 #ifdef DEBUG
        if (msg) {
-               TRACE(("exverror(%d, \"", cond));
-               TRACEV((msg, ap));
-               TRACE(("\") pid=%d\n", getpid()));
+               CTRACE(DBG_ERRS, ("exverror(%d, \"", cond));
+               CTRACEV(DBG_ERRS, (msg, ap));
+               CTRACE(DBG_ERRS, ("\") pid=%d\n", getpid()));
        } else
-               TRACE(("exverror(%d, NULL) pid=%d\n", cond, getpid()));
+               CTRACE(DBG_ERRS, ("exverror(%d, NULL) pid=%d\n", cond,
+                   getpid()));
 #endif
        if (msg)
                exvwarning(-1, msg, ap);
diff -r ac6acba3c49e -r 6496016e83ac bin/sh/main.c
--- a/bin/sh/main.c     Wed Jul 05 19:58:10 2017 +0000
+++ b/bin/sh/main.c     Wed Jul 05 20:00:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.71 2017/06/19 02:49:33 kre Exp $    */
+/*     $NetBSD: main.c,v 1.72 2017/07/05 20:00:27 kre Exp $    */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.7 (Berkeley) 7/19/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.71 2017/06/19 02:49:33 kre Exp $");
+__RCSID("$NetBSD: main.c,v 1.72 2017/07/05 20:00:27 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -263,7 +263,7 @@
        int numeof = 0;
        enum skipstate skip;
 
-       TRACE(("cmdloop(%d) called\n", top));
+       CTRACE(DBG_ALWAYS, ("cmdloop(%d) called\n", top));
        setstackmark(&smark);
        for (;;) {
                if (pendingsigs)
@@ -277,8 +277,7 @@
                        nflag = 0;
                }
                n = parsecmd(inter);
-               TRACE(("cmdloop: "); showtree(n));
-               /* showtree(n); DEBUG */
+               VXTRACE(DBG_PARSE|DBG_EVAL|DBG_CMDS,("cmdloop: "),showtree(n));
                if (n == NEOF) {
                        if (!top || numeof >= 50)
                                break;
diff -r ac6acba3c49e -r 6496016e83ac bin/sh/var.c
--- a/bin/sh/var.c      Wed Jul 05 19:58:10 2017 +0000
+++ b/bin/sh/var.c      Wed Jul 05 20:00:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.63 2017/06/30 23:05:45 kre Exp $     */
+/*     $NetBSD: var.c,v 1.64 2017/07/05 20:00:27 kre Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)var.c      8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: var.c,v 1.63 2017/06/30 23:05:45 kre Exp $");
+__RCSID("$NetBSD: var.c,v 1.64 2017/07/05 20:00:27 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -954,7 +954,7 @@
        while ((lvp = localvars) != NULL) {
                localvars = lvp->next;
                vp = lvp->vp;
-               TRACE(("poplocalvar %s", vp ? vp->text : "-"));
+               VTRACE(DBG_VARS, ("poplocalvar %s", vp ? vp->text : "-"));
                if (vp == NULL) {       /* $- saved */
                        memcpy(optlist, lvp->text, sizeof_optlist);
                        ckfree(lvp->text);



Home | Main Index | Thread Index | Old Index