Spinkle some consts and remove/change parameter names so that sysinst

will compile with WARNS=3.
This commit is contained in:
dsl 2003-07-25 07:22:05 +00:00
parent 9957c167e0
commit 2304abbd2b
2 changed files with 16 additions and 17 deletions

View File

@ -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 <sys/cdefs.h>
#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"
);

View File

@ -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);