rogue4: fix most GCC5 warnings.

Converting all function definitions to ANSI style accounts for most of
the change.  This has exposed other problems, such as daemons not
actually being their stated type, that will require more careful
solutions.
This commit is contained in:
John "Elwin" Edwards 2016-01-27 19:41:05 -05:00
parent 384386d71c
commit c1d6a6af6a
32 changed files with 625 additions and 394 deletions

View file

@ -36,7 +36,10 @@ typedef struct optstruct OPTION;
int allowchange(OPTION *opt);
int put_bool(), get_bool(), put_str(), get_str();
void put_bool(bool *b);
void put_str(char *str);
int get_bool(bool *bp, WINDOW *win);
int get_str(char *opt, WINDOW *win);
OPTION optlist[] = {
{"terse", "Terse output: ",
@ -63,7 +66,8 @@ OPTION optlist[] = {
* option:
* Print and then set options from the terminal
*/
option()
void
option(void)
{
register OPTION *op;
register int retval;
@ -125,8 +129,8 @@ option()
* put_bool
* Put out a boolean
*/
put_bool(b)
bool *b;
void
put_bool(bool *b)
{
waddstr(hw, *b ? "True" : "False");
}
@ -135,8 +139,8 @@ bool *b;
* put_str:
* Put out a string
*/
put_str(str)
char *str;
void
put_str(char *str)
{
waddstr(hw, str);
}
@ -145,9 +149,8 @@ char *str;
* get_bool:
* Allow changing a boolean option and print it out
*/
get_bool(bp, win)
bool *bp;
WINDOW *win;
int
get_bool(bool *bp, WINDOW *win)
{
register int oy, ox;
register bool op_bad;
@ -196,9 +199,8 @@ WINDOW *win;
*/
#define MAXINP 50 /* max string to read from terminal or environment */
get_str(opt, win)
register char *opt;
WINDOW *win;
int
get_str(char *opt, WINDOW *win)
{
register char *sp;
register int c, oy, ox;
@ -274,9 +276,8 @@ WINDOW *win;
* get_num:
* Get a numeric option
*/
get_num(opt, win)
short *opt;
WINDOW *win;
int
get_num(short *opt, WINDOW *win)
{
register int i;
char buf[MAXSTR];
@ -295,8 +296,8 @@ WINDOW *win;
* being "name=....", with the string being defined up to a comma
* or the end of the entire option string.
*/
parse_opts(str)
register char *str;
void
parse_opts(char *str)
{
register char *sp;
register OPTION *op;
@ -373,9 +374,8 @@ register char *str;
* strucpy:
* Copy string using unctrol for things
*/
strucpy(s1, s2, len)
register char *s1, *s2;
register int len;
void
strucpy(char *s1, char *s2, int len)
{
if (len > MAXINP)
len = MAXINP;