Module Name:    src
Committed By:   kre
Date:           Wed Jul  5 20:00:27 UTC 2017

Modified Files:
        src/bin/sh: cd.c error.c main.c var.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/bin/sh/cd.c
cvs rdiff -u -r1.39 -r1.40 src/bin/sh/error.c
cvs rdiff -u -r1.71 -r1.72 src/bin/sh/main.c
cvs rdiff -u -r1.63 -r1.64 src/bin/sh/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/cd.c
diff -u src/bin/sh/cd.c:1.49 src/bin/sh/cd.c:1.50
--- src/bin/sh/cd.c:1.49	Sat Jun 17 04:19:12 2017
+++ src/bin/sh/cd.c	Wed Jul  5 20:00:27 2017
@@ -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 @@ docd(const char *dest, int print)
 	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

Index: src/bin/sh/error.c
diff -u src/bin/sh/error.c:1.39 src/bin/sh/error.c:1.40
--- src/bin/sh/error.c:1.39	Wed Jun  1 02:50:02 2016
+++ src/bin/sh/error.c	Wed Jul  5 20:00:27 2017
@@ -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 @@ exverror(int cond, const char *msg, va_l
 
 #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);

Index: src/bin/sh/main.c
diff -u src/bin/sh/main.c:1.71 src/bin/sh/main.c:1.72
--- src/bin/sh/main.c:1.71	Mon Jun 19 02:49:33 2017
+++ src/bin/sh/main.c	Wed Jul  5 20:00:27 2017
@@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19
 #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 @@ cmdloop(int top)
 	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 @@ cmdloop(int top)
 			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;

Index: src/bin/sh/var.c
diff -u src/bin/sh/var.c:1.63 src/bin/sh/var.c:1.64
--- src/bin/sh/var.c:1.63	Fri Jun 30 23:05:45 2017
+++ src/bin/sh/var.c	Wed Jul  5 20:00:27 2017
@@ -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 @@ poplocalvars(void)
 	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);

Reply via email to