summaryrefslogtreecommitdiff
path: root/sys/lib/libsa
diff options
context:
space:
mode:
authorsimonb <simonb@NetBSD.org>1999-02-22 07:53:52 +0000
committersimonb <simonb@NetBSD.org>1999-02-22 07:53:52 +0000
commitf60844a6571df779ccc6294fce3ff89814cc7cfd (patch)
treec3195db297567d370e63ba493419d402bc2ea23a /sys/lib/libsa
parentf92717688970bc9929da167396610cd90654b57a (diff)
Use printf() instead of putchar() if SA_NOPUTCHAR is defined (for the
pmax). Also don't include stdarg.h/varargs.h - we don't use them here.
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r--sys/lib/libsa/twiddle.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/lib/libsa/twiddle.c b/sys/lib/libsa/twiddle.c
index a58876a8fa4..8e3bee0f0c1 100644
--- a/sys/lib/libsa/twiddle.c
+++ b/sys/lib/libsa/twiddle.c
@@ -1,4 +1,4 @@
-/* $NetBSD: twiddle.c,v 1.1 1999/02/13 20:56:58 pk Exp $ */
+/* $NetBSD: twiddle.c,v 1.2 1999/02/22 07:53:52 simonb Exp $ */
/*-
* Copyright (c) 1993
@@ -60,19 +60,21 @@
#include <sys/cdefs.h>
#include <sys/types.h>
-#ifdef __STDC__
-#include <machine/stdarg.h>
-#else
-#include <machine/varargs.h>
-#endif
#include "stand.h"
+#define TWIDDLE_CHARS "|/-\\"
+
void
twiddle()
{
static int pos;
- putchar("|/-\\"[pos++ & 3]);
+#ifdef SA_NOPUTCHAR
+ printf("%c\b", TWIDDLE_CHARS[pos++ & 3]);
+#else
+ putchar(TWIDDLE_CHARS[pos++ & 3]);
putchar('\b');
+#endif
+
}