Source-Changes-HG archive

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

[src/netbsd-1-4]: src/usr.bin/msgc pull up rev(s) 1.3-1.5 from trunk. (cgd)



details:   https://anonhg.NetBSD.org/src/rev/bd568a5b80a3
branches:  netbsd-1-4
changeset: 468943:bd568a5b80a3
user:      cgd <cgd%NetBSD.org@localhost>
date:      Thu Jun 24 00:34:51 1999 +0000

description:
pull up rev(s) 1.3-1.5 from trunk. (cgd)

diffstat:

 usr.bin/msgc/msgdb.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (58 lines):

diff -r e532fc2ee5ad -r bd568a5b80a3 usr.bin/msgc/msgdb.c
--- a/usr.bin/msgc/msgdb.c      Thu Jun 24 00:34:45 1999 +0000
+++ b/usr.bin/msgc/msgdb.c      Thu Jun 24 00:34:51 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msgdb.c,v 1.2 1997/10/03 16:37:25 enami Exp $  */
+/*     $NetBSD: msgdb.c,v 1.2.4.1 1999/06/24 00:34:51 cgd Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -46,11 +46,9 @@
 
 static struct id_rec *head = NULL, *tail = NULL;
 static int msg_no = 0;
-static int maxstr = 1;
 
 void define_msg (char *name, char *value)
 {
-       int vlen = strlen(value);
        struct id_rec *tmp = (struct id_rec *)malloc(sizeof(struct id_rec));
 
        if (find_id (root, name))
@@ -68,9 +66,6 @@
        }
 
        insert_id (&root, tmp);
-
-       if (vlen > maxstr)
-               maxstr = vlen;
 }
 
 static void write_str (FILE *f, char *str)
@@ -140,14 +135,15 @@
                "#ifndef MSG_DEFS_H\n"
                "#define MSG_DEFS_H\n"
                "#include <stdio.h>\n"
+               "#include <stdlib.h>\n"
                "#include <string.h>\n"
                "#include <ctype.h>\n"
                "#include <stdarg.h>\n"
                "#include <curses.h>\n"
                "\n"
                "/* Prototypes */\n"
-               "void beep(void);\n"
-               "void msg_window(WINDOW *window);\n"
+               "void msg_beep(void);\n"
+               "int  msg_window(WINDOW *window);\n"
                "char *msg_string (int msg_no);\n"
                "void msg_clear(void);\n"
                "void msg_standout(void);\n"
@@ -174,7 +170,7 @@
                (void) fprintf (out_file, "#define MSG_%s\t%d\n",
                                t->id, t->msg_no);
        }
-       (void) fprintf (out_file, "#define MAXSTR %d\n\n#endif\n", 2*maxstr);
+       (void) fprintf (out_file, "\n#endif\n");
 
        fclose (out_file);
 



Home | Main Index | Thread Index | Old Index