Mercurial > hg > early-roguelike
diff rogue4/options.c @ 239:837044d2c362
Merge the GCC5 and build fix branches.
This fixes all warnings produced by GCC 5, except the ones related to
system functions. Those could be fixed by including the proper headers,
but it would be better to replace the system-dependent code with
functions from mdport.c.
author | John "Elwin" Edwards |
---|---|
date | Fri, 11 Mar 2016 19:47:52 -0500 |
parents | 50b89f165a34 |
children | e52a8a7ad4c5 |
line wrap: on
line diff
--- a/rogue4/options.c Tue Mar 08 19:45:41 2016 -0500 +++ b/rogue4/options.c Fri Mar 11 19:47:52 2016 -0500 @@ -27,8 +27,8 @@ struct optstruct { char *o_name; /* option name */ char *o_prompt; /* prompt for interactive entry */ - int *o_opt; /* pointer to thing to set */ - int (*o_putfunc)(); /* function to print value */ + void *o_opt; /* pointer to thing to set */ + void (*o_putfunc)(); /* function to print value */ int (*o_getfunc)(); /* function to get value interactively */ }; @@ -43,23 +43,23 @@ OPTION optlist[] = { {"terse", "Terse output: ", - (int *) &terse, put_bool, get_bool }, + (void *) &terse, put_bool, get_bool }, {"flush", "Flush typeahead during battle: ", - (int *) &fight_flush, put_bool, get_bool }, + (void *) &fight_flush, put_bool, get_bool }, {"jump", "Show position only at end of run: ", - (int *) &jump, put_bool, get_bool }, + (void *) &jump, put_bool, get_bool }, {"step", "Do inventories one line at a time: ", - (int *) &slow_invent, put_bool, get_bool }, + (void *) &slow_invent, put_bool, get_bool }, {"askme", "Ask me about unidentified things: ", - (int *) &askme, put_bool, get_bool }, + (void *) &askme, put_bool, get_bool }, {"passgo", "Follow turnings in passageways: ", - (int *) &passgo, put_bool, get_bool }, + (void *) &passgo, put_bool, get_bool }, {"name", "Name: ", - (int *) whoami, put_str, get_str }, + (void *) whoami, put_str, get_str }, {"fruit", "Fruit: ", - (int *) fruit, put_str, get_str }, + (void *) fruit, put_str, get_str }, {"file", "Save file: ", - (int *) file_name, put_str, get_str } + (void *) file_name, put_str, get_str } }; /*