summaryrefslogtreecommitdiff
path: root/usr.bin/msgc/msg_sys.def
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1999-06-23 09:19:33 +0000
committercgd <cgd@NetBSD.org>1999-06-23 09:19:33 +0000
commitbeba4bb3e5d3e40a0d1c925b413fc7c16cbbba11 (patch)
treeb6b490496482a46a85859ac076d50388040812a0 /usr.bin/msgc/msg_sys.def
parent6ced982bb23375776789c083bdbd6586b5dee10a (diff)
replace lots of wclear()/wmove() calls with calls to msg_clear(). wmove()
to 0,0 was unnecessary because wclear() is documented to do that. also, the immediate wrefresh() done by msg_clear() means that if we can take advantage of full screen clear sequence, we will.
Diffstat (limited to 'usr.bin/msgc/msg_sys.def')
-rw-r--r--usr.bin/msgc/msg_sys.def19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/msgc/msg_sys.def b/usr.bin/msgc/msg_sys.def
index c5f427347ee..ad940564526 100644
--- a/usr.bin/msgc/msg_sys.def
+++ b/usr.bin/msgc/msg_sys.def
@@ -1,4 +1,4 @@
-/* $NetBSD: msg_sys.def,v 1.6 1999/06/22 15:00:37 cgd Exp $ */
+/* $NetBSD: msg_sys.def,v 1.7 1999/06/23 09:19:33 cgd Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -41,6 +41,7 @@ static char *cbuffer;
static size_t cbuffersize;
static int do_echo = 1;
+
/* Routines */
void msg_beep (void)
@@ -103,9 +104,9 @@ void msg_display(int msg_no, ...)
{
va_list ap;
+ msg_clear();
+
va_start(ap, msg_no);
- wclear (msg_win);
- wmove (msg_win, 0, 0);
(void)msg_vprintf (msg_list[msg_no], ap);
va_end(ap);
}
@@ -124,9 +125,9 @@ int msg_printf (char *fmt, ...)
va_list ap;
int res;
+ msg_clear();
+
va_start (ap, fmt);
- wclear (msg_win);
- wmove (msg_win, 0, 0);
res = msg_vprintf (fmt, ap);
va_end (ap);
return res;
@@ -227,9 +228,9 @@ void msg_prompt_str (char *msg, char *def, char *val, int max_chars, ...)
{
va_list ap;
+ msg_clear();
+
va_start (ap, max_chars);
- wclear (msg_win);
- wmove (msg_win, 0, 0);
msg_vprompt (msg, def, val, max_chars, ap);
va_end (ap);
}
@@ -238,9 +239,9 @@ void msg_prompt (int msg_no, char *def, char *val, int max_chars, ...)
{
va_list ap;
+ msg_clear();
+
va_start (ap, max_chars);
- wclear (msg_win);
- wmove (msg_win, 0, 0);
msg_vprompt (msg_list[msg_no], def, val, max_chars, ap);
va_end (ap);
}