Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/msgc replace lots of wclear()/wmove() calls with cal...



details:   https://anonhg.NetBSD.org/src/rev/66692e35d779
branches:  trunk
changeset: 473952:66692e35d779
user:      cgd <cgd%NetBSD.org@localhost>
date:      Wed Jun 23 09:19:33 1999 +0000

description:
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:

 usr.bin/msgc/msg_sys.def |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (65 lines):

diff -r 0f025464e806 -r 66692e35d779 usr.bin/msgc/msg_sys.def
--- a/usr.bin/msgc/msg_sys.def  Wed Jun 23 09:09:44 1999 +0000
+++ b/usr.bin/msgc/msg_sys.def  Wed Jun 23 09:19:33 1999 +0000
@@ -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 size_t cbuffersize;
 static int do_echo = 1;
 
+
 /* Routines */
 
 void msg_beep (void)
@@ -103,9 +104,9 @@
 {
        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 @@
        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 @@
 {
        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 @@
 {
        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);
 }



Home | Main Index | Thread Index | Old Index