Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/msgc nuke msg_prompt_str, msg_prompt_addstr, and msg...



details:   https://anonhg.NetBSD.org/src/rev/afcc584e34ce
branches:  trunk
changeset: 474360:afcc584e34ce
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sun Jul 04 10:13:12 1999 +0000

description:
nuke msg_prompt_str, msg_prompt_addstr, and msg_table (unused), and make
msg_vprintf private.

diffstat:

 usr.bin/msgc/msg_sys.def |  60 +++++++++++++----------------------------------
 usr.bin/msgc/msgc.1      |  10 +-------
 usr.bin/msgc/msgdb.c     |   8 +-----
 3 files changed, 19 insertions(+), 59 deletions(-)

diffs (219 lines):

diff -r aa936b7db3da -r afcc584e34ce usr.bin/msgc/msg_sys.def
--- a/usr.bin/msgc/msg_sys.def  Sun Jul 04 09:51:45 1999 +0000
+++ b/usr.bin/msgc/msg_sys.def  Sun Jul 04 10:13:12 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg_sys.def,v 1.11 1999/07/04 09:37:18 cgd Exp $       */
+/*     $NetBSD: msg_sys.def,v 1.12 1999/07/04 10:13:12 cgd Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -44,6 +44,10 @@
 static int last_i_was_nl, last_i_was_space;
 static int last_o_was_punct, last_o_was_space;
 
+static int     _msg_vprintf(int auto_fill, char *fmt, va_list ap);
+static void    _msg_vprompt(char *msg, char *def, char *val, int max_chars,
+                   va_list ap);
+
 /* Routines */
 
 void msg_beep (void)
@@ -94,7 +98,8 @@
        wstandend(msg_win);
 }
 
-int msg_vprintf (int auto_fill, char *fmt, va_list ap)
+static int
+_msg_vprintf(int auto_fill, char *fmt, va_list ap)
 {
        const char *wstart, *afterw;
        int wordlen, nspaces;
@@ -226,7 +231,7 @@
        msg_clear();
 
        va_start(ap, msg_no);
-       (void)msg_vprintf(1, msg_list[msg_no], ap);
+       (void)_msg_vprintf(1, msg_list[msg_no], ap);
        va_end(ap);
 }
 
@@ -235,7 +240,7 @@
        va_list ap;
 
        va_start (ap, msg_no);
-       (void)msg_vprintf(1, msg_list[msg_no], ap);
+       (void)_msg_vprintf(1, msg_list[msg_no], ap);
        va_end (ap);
 }
 
@@ -247,7 +252,7 @@
        msg_clear();
 
        va_start (ap, fmt);
-       res = msg_vprintf (1, fmt, ap);
+       res = _msg_vprintf(1, fmt, ap);
        va_end (ap);
        return res;
 }
@@ -258,21 +263,21 @@
        int  res;
 
        va_start (ap, fmt);
-       res = msg_vprintf (1, fmt, ap);
+       res = _msg_vprintf(1, fmt, ap);
        va_end (ap);
        return res;
 }
 
 
-static void msg_vprompt (char *msg, char *def, char *val, int max_chars,
-                        va_list ap)
+static void
+_msg_vprompt(char *msg, char *def, char *val, int max_chars, va_list ap)
 {
        int ch;
        int count = 0;
        int y,x;
        char *ibuf = alloca(max_chars);
 
-       msg_vprintf (0, msg, ap);
+       _msg_vprintf(0, msg, ap);
        if (def != NULL && *def) {
                waddstr (msg_win, " [");
                waddstr (msg_win, def);
@@ -352,35 +357,15 @@
        }
 }
 
-void msg_prompt_addstr (char *fmt, char *def, char *val, int max_chars, ...)
-{
-       va_list ap;
-
-       va_start (ap, max_chars);
-       msg_vprompt (fmt, def, val, max_chars, ap);
-       va_end(ap);
-}
-
 void msg_prompt_add (int msg_no, char *def, char *val, int max_chars, ...)
 {
        va_list ap;
 
        va_start (ap, max_chars);
-       msg_vprompt (msg_list[msg_no], def, val, max_chars, ap);
+       _msg_vprompt(msg_list[msg_no], def, val, max_chars, ap);
        va_end(ap);
 }
 
-void msg_prompt_str (char *msg, char *def, char *val, int max_chars, ...)
-{
-       va_list ap;
-
-       msg_clear();
-
-       va_start (ap, max_chars);
-       msg_vprompt (msg, def, val, max_chars, ap);
-       va_end (ap);
-}
-
 void msg_prompt (int msg_no, char *def, char *val, int max_chars, ...)
 {
        va_list ap;
@@ -388,7 +373,7 @@
        msg_clear();
 
        va_start (ap, max_chars);
-       msg_vprompt (msg_list[msg_no], def, val, max_chars, ap);
+       _msg_vprompt(msg_list[msg_no], def, val, max_chars, ap);
        va_end (ap);
 }
 
@@ -402,23 +387,12 @@
        do_echo = 1;
 }
 
-void msg_table(int msg_no, ...)
-{
-       va_list ap;
-
-       msg_clear();
-
-       va_start(ap, msg_no);
-       (void)msg_vprintf(0, msg_list[msg_no], ap);
-       va_end(ap);
-}
-
 void msg_table_add(int msg_no, ...)
 {
        va_list ap;
 
        va_start (ap, msg_no);
-       (void)msg_vprintf(0, msg_list[msg_no], ap);
+       (void)_msg_vprintf(0, msg_list[msg_no], ap);
        va_end (ap);
 }
 
diff -r aa936b7db3da -r afcc584e34ce usr.bin/msgc/msgc.1
--- a/usr.bin/msgc/msgc.1       Sun Jul 04 09:51:45 1999 +0000
+++ b/usr.bin/msgc/msgc.1       Sun Jul 04 10:13:12 1999 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: msgc.1,v 1.5 1999/07/04 07:40:51 cgd Exp $
+.\"    $NetBSD: msgc.1,v 1.6 1999/07/04 10:13:12 cgd Exp $
 .\"
 .\" Copyright 1997 Piermont Information Systems Inc.
 .\" All rights reserved.
@@ -62,8 +62,6 @@
 .Ft void 
 .Fn msg_display_add "int msg_no" ...
 .Ft int  
-.Fn msg_vprintf  "int auto_fill" "char *fmt" "va_list ap"
-.Ft int  
 .Fn msg_printf  "char *fmt" ...
 .Ft int  
 .Fn msg_printf_add  "char *fmt" ...
@@ -72,16 +70,10 @@
 .Ft void 
 .Fn msg_prompt  "int msg_no" "char *def" "char *val" "int max_chars" ...
 .Ft void 
-.Fn msg_prompt_str  "char *msg" "char *def" "char *val" "int max_chars" ...
-.Ft void 
-.Fn msg_prompt_addstr  "char *msg" "char *def" "char *val" "int max_chars" ...
-.Ft void 
 .Fn msg_echo  "void"
 .Ft void 
 .Fn msg_noecho  "void"
 .Ft void 
-.Fn msg_table "int msg_no" ...
-.Ft void 
 .Fn msg_table_add "int msg_no" ...
 .Sh DESCRIPTION
 This implements a curses based message display system.  A source file that 
diff -r aa936b7db3da -r afcc584e34ce usr.bin/msgc/msgdb.c
--- a/usr.bin/msgc/msgdb.c      Sun Jul 04 09:51:45 1999 +0000
+++ b/usr.bin/msgc/msgdb.c      Sun Jul 04 10:13:12 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msgdb.c,v 1.6 1999/07/04 07:40:51 cgd Exp $    */
+/*     $NetBSD: msgdb.c,v 1.7 1999/07/04 10:13:12 cgd Exp $    */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -150,20 +150,14 @@
                "void msg_standend(void);\n"
                "void msg_display(int msg_no,...);\n"
                "void msg_display_add(int msg_no,...);\n"
-               "int  msg_vprintf (int auto_fill, char *fmt, va_list ap);\n"
                "int  msg_printf (char *fmt, ...);\n"
                "int  msg_printf_add (char *fmt, ...);\n"
-               "void msg_prompt_str (char *msg, char *def, char *val,"
-                       " int max_chars, ...);\n"
                "void msg_prompt (int msg_no, char *def, char *val,"
                        " int max_chars, ...);\n"
-               "void msg_prompt_addstr (char *msg, char *def, char *val,"
-                       "int max_chars, ...);\n"
                "void msg_prompt_add (int msg_no, char *def, char *val,"
                        " int max_chars, ...);\n"
                "void msg_echo (void);\n"
                "void msg_noecho (void);\n"
-               "void msg_table(int msg_no,...);\n"
                "void msg_table_add(int msg_no,...);\n"
                "\n"
                "/* Message names */\n"



Home | Main Index | Thread Index | Old Index