Source-Changes-HG archive

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

[src/trunk]: src/bin/sh dprintf is claimed by posix.



details:   https://anonhg.NetBSD.org/src/rev/2c8ac7b73265
branches:  trunk
changeset: 757445:2c8ac7b73265
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Aug 30 06:27:14 2010 +0000

description:
dprintf is claimed by posix.

diffstat:

 bin/sh/input.c  |  8 ++++----
 bin/sh/output.c |  8 +++++---
 bin/sh/output.h |  4 +++-
 3 files changed, 12 insertions(+), 8 deletions(-)

diffs (93 lines):

diff -r 29ef56133e87 -r 2c8ac7b73265 bin/sh/input.c
--- a/bin/sh/input.c    Mon Aug 30 06:26:59 2010 +0000
+++ b/bin/sh/input.c    Mon Aug 30 06:27:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: input.c,v 1.42 2009/03/10 21:21:11 roy Exp $   */
+/*     $NetBSD: input.c,v 1.43 2010/08/30 06:27:14 christos Exp $      */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)input.c    8.3 (Berkeley) 6/9/95";
 #else
-__RCSID("$NetBSD: input.c,v 1.42 2009/03/10 21:21:11 roy Exp $");
+__RCSID("$NetBSD: input.c,v 1.43 2010/08/30 06:27:14 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -338,7 +338,7 @@
        struct strpush *sp;
 
        INTOFF;
-/*dprintf("*** calling pushstring: %s, %d\n", s, len);*/
+/*debugprintf("*** calling pushstring: %s, %d\n", s, len);*/
        if (parsefile->strpush) {
                sp = ckmalloc(sizeof (struct strpush));
                sp->prev = parsefile->strpush;
@@ -365,7 +365,7 @@
        parsenextc = sp->prevstring;
        parsenleft = sp->prevnleft;
        parselleft = sp->prevlleft;
-/*dprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/
+/*debugprintf("*** calling popstring: restoring to '%s'\n", parsenextc);*/
        if (sp->ap)
                sp->ap->flag &= ~ALIASINUSE;
        parsefile->strpush = sp->prev;
diff -r 29ef56133e87 -r 2c8ac7b73265 bin/sh/output.c
--- a/bin/sh/output.c   Mon Aug 30 06:26:59 2010 +0000
+++ b/bin/sh/output.c   Mon Aug 30 06:27:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: output.c,v 1.32 2010/07/19 01:15:17 joerg Exp $        */
+/*     $NetBSD: output.c,v 1.33 2010/08/30 06:27:14 christos Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)output.c   8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: output.c,v 1.32 2010/07/19 01:15:17 joerg Exp $");
+__RCSID("$NetBSD: output.c,v 1.33 2010/08/30 06:27:14 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -264,8 +264,9 @@
        va_end(ap);
 }
 
+#ifdef DEBUG
 void
-dprintf(const char *fmt, ...)
+debugprintf(const char *fmt, ...)
 {
        va_list ap;
 
@@ -274,6 +275,7 @@
        va_end(ap);
        flushout(out2);
 }
+#endif
 
 void
 fmtstr(char *outbuf, size_t length, const char *fmt, ...)
diff -r 29ef56133e87 -r 2c8ac7b73265 bin/sh/output.h
--- a/bin/sh/output.h   Mon Aug 30 06:26:59 2010 +0000
+++ b/bin/sh/output.h   Mon Aug 30 06:27:14 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: output.h,v 1.20 2008/10/31 14:38:42 christos Exp $     */
+/*     $NetBSD: output.h,v 1.21 2010/08/30 06:27:14 christos Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -70,8 +70,10 @@
     __attribute__((__format__(__printf__,2,3)));
 void out1fmt(const char *, ...)
     __attribute__((__format__(__printf__,1,2)));
+#ifdef DEBUG
 void dprintf(const char *, ...)
     __attribute__((__format__(__printf__,1,2)));
+#endif
 void fmtstr(char *, size_t, const char *, ...)
     __attribute__((__format__(__printf__,3,4)));
 void doformat(struct output *, const char *, va_list);



Home | Main Index | Thread Index | Old Index