From 2304abbd2be4765a1d0845d6c10f66490ae65217 Mon Sep 17 00:00:00 2001 From: dsl Date: Fri, 25 Jul 2003 07:22:05 +0000 Subject: [PATCH] Spinkle some consts and remove/change parameter names so that sysinst will compile with WARNS=3. --- usr.bin/menuc/mdb.c | 25 ++++++++++++------------- usr.bin/menuc/menu_sys.def | 8 ++++---- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/usr.bin/menuc/mdb.c b/usr.bin/menuc/mdb.c index 401c87655550..28f4944abac7 100644 --- a/usr.bin/menuc/mdb.c +++ b/usr.bin/menuc/mdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: mdb.c,v 1.36 2003/07/17 08:33:44 lukem Exp $ */ +/* $NetBSD: mdb.c,v 1.37 2003/07/25 07:22:05 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -41,7 +41,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: mdb.c,v 1.36 2003/07/17 08:33:44 lukem Exp $"); +__RCSID("$NetBSD: mdb.c,v 1.37 2003/07/25 07:22:05 dsl Exp $"); #endif @@ -222,21 +222,20 @@ write_menu_file (char *initcode) "extern int __m_endwin;\n" "\n" "/* Prototypes */\n" - "int menu_init (void);\n" - "void process_menu (int num, void *arg);\n" - "void __menu_initerror (void);\n" + "int menu_init(void);\n" + "void process_menu(int, void *);\n" + "void __menu_initerror(void);\n" ); if (do_dynamic) (void) fprintf (out_file, "%s", - "int new_menu(const char *title, menu_ent *opts, " - "int numopts, \n" - "\tint x, int y, int h, int w, int mopt,\n" - "\tvoid (*post_act)(menudesc *, void *), " - "void (*draw_line)(menudesc *, int, void *),\n" - "\tvoid (*exit_act)(menudesc *, void *), " - "const char *help, const char *exit);\n" - "void free_menu(int menu_no);\n" + "int new_menu(const char *, menu_ent *, int, \n" + "\tint, int, int, int, int,\n" + "\tvoid (*)(menudesc *, void *), " + "void (*)(menudesc *, int, void *),\n" + "\tvoid (*)(menudesc *, void *), " + "const char *, const char *);\n" + "void free_menu(int);\n" "void set_menu_numopts(int, int);\n" ); diff --git a/usr.bin/menuc/menu_sys.def b/usr.bin/menuc/menu_sys.def index a754c16e6e26..f3ca9a9798e1 100644 --- a/usr.bin/menuc/menu_sys.def +++ b/usr.bin/menuc/menu_sys.def @@ -1,4 +1,4 @@ -/* $NetBSD: menu_sys.def,v 1.43 2003/07/07 12:20:56 dsl Exp $ */ +/* $NetBSD: menu_sys.def,v 1.44 2003/07/25 07:22:05 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -57,7 +57,7 @@ static int __menu_init = 0; int __m_endwin = 0; static int max_lines = 0, max_cols = 0; -static char *scrolltext = " <: page up, >: page down"; +static const char *scrolltext = " <: page up, >: page down"; static menudesc *menus = menu_def; @@ -683,7 +683,7 @@ new_menu(const char *title, menu_ent *opts, int numopts, void (*post_act)(menudesc *, void *), void (*draw_line)(menudesc *, int, void *), void (*exit_act)(menudesc *, void *), - const char * help, const char *exit) + const char *help, const char *exit_str) { int ix; menudesc *m; @@ -710,7 +710,7 @@ new_menu(const char *title, menu_ent *opts, int numopts, m->draw_line = draw_line; m->exit_act = exit_act; m->helpstr = help; - m->exitstr = exit ? exit : "Exit"; + m->exitstr = exit_str ? exit_str : "Exit"; init_menu(m);