summaryrefslogtreecommitdiffstats
path: root/bin/sh/show.c
diff options
context:
space:
mode:
authorsteve <steve@FreeBSD.org>1996-12-14 06:20:03 +0000
committersteve <steve@FreeBSD.org>1996-12-14 06:20:03 +0000
commitc58aca035e2c61510b619368861598623eb95e52 (patch)
tree049d84189a59de29d49254b609a318b17ee59387 /bin/sh/show.c
parenta958416f1b4a022c358b94db0b8e6bcc6cb54ee0 (diff)
downloadFreeBSD-src-c58aca035e2c61510b619368861598623eb95e52.zip
FreeBSD-src-c58aca035e2c61510b619368861598623eb95e52.tar.gz
Merge in NetBSD mods and -Wall cleaning.
Obtained from: NetBSD, me
Diffstat (limited to 'bin/sh/show.c')
-rw-r--r--bin/sh/show.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/bin/sh/show.c b/bin/sh/show.c
index 4f5d546..ab05404 100644
--- a/bin/sh/show.c
+++ b/bin/sh/show.c
@@ -33,11 +33,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: show.c,v 1.3 1996/09/01 10:21:43 peter Exp $
+ * $Id: show.c,v 1.4 1996/09/03 14:16:00 peter Exp $
*/
#ifndef lint
-static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95";
+static char const sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95";
#endif /* not lint */
#include <stdio.h>
@@ -269,8 +269,6 @@ indent(amount, pfx, fp)
putc('\t', fp);
}
}
-#endif
-
/*
@@ -288,27 +286,25 @@ int debug = 0;
void
-trputc(c)
+trputc(c)
int c;
{
-#ifdef DEBUG
if (tracefile == NULL)
return;
putc(c, tracefile);
if (c == '\n')
fflush(tracefile);
-#endif
}
+
void
#if __STDC__
-shtrace(const char *fmt, ...)
+trace(const char *fmt, ...)
#else
-shtrace(va_alist)
+trace(va_alist)
va_dcl
#endif
{
-#ifdef DEBUG
va_list va;
#if __STDC__
va_start(va, fmt);
@@ -323,7 +319,6 @@ shtrace(va_alist)
(void) fflush(tracefile);
}
va_end(va);
-#endif
}
@@ -331,17 +326,14 @@ void
trputs(s)
char *s;
{
-#ifdef DEBUG
if (tracefile == NULL)
return;
fputs(s, tracefile);
if (strchr(s, '\n'))
fflush(tracefile);
-#endif
}
-#ifdef DEBUG
static void
trstring(s)
char *s;
@@ -381,14 +373,12 @@ backslash: putc('\\', tracefile);
}
putc('"', tracefile);
}
-#endif
void
trargs(ap)
char **ap;
{
-#ifdef DEBUG
if (tracefile == NULL)
return;
while (*ap) {
@@ -399,13 +389,11 @@ trargs(ap)
putc('\n', tracefile);
}
fflush(tracefile);
-#endif
}
void
opentrace() {
-#ifdef DEBUG
char s[100];
char *getenv();
#ifdef O_APPEND
@@ -439,5 +427,5 @@ opentrace() {
#endif
fputs("\nTracing started.\n", tracefile);
fflush(tracefile);
-#endif /* DEBUG */
}
+#endif /* DEBUG */
OpenPOWER on IntegriCloud