Super-Rogue: convert to ANSI-style function declarations.

This fixes most of the build warnings.
This commit is contained in:
John "Elwin" Edwards 2016-01-31 13:45:07 -05:00
parent 0f87d5b4d8
commit 59f448e92e
33 changed files with 783 additions and 518 deletions

View file

@ -30,7 +30,7 @@ struct optstruct {
typedef struct optstruct OPTION;
int put_str(), get_str();
int allowchange(OPTION *opt);
OPTION optlist[] = {
{ "name", "Name: ", whoami },
@ -46,7 +46,8 @@ OPTION safeoptlist[] = {
/*
* print and then set options from the terminal
*/
option()
void
option(void)
{
reg OPTION *op;
reg int wh;
@ -106,9 +107,8 @@ option()
* Set a string option
*/
#define CTRLB 2
get_str(opt, awin)
char *opt;
WINDOW *awin;
int
get_str(char *opt, WINDOW *awin)
{
reg char *sp;
reg int c, oy, ox;
@ -119,7 +119,7 @@ WINDOW *awin;
/*
* loop reading in the string, and put it in a temporary buffer
*/
for (sp = buf; (c=readchar(awin)) != '\n' && c != '\r' && c != ESCAPE;
for (sp = buf; (c=readchar()) != '\n' && c != '\r' && c != ESCAPE;
wclrtoeol(awin), draw(awin)) {
if (sp - buf >= 50) {
*sp = '\0'; /* line was too long */
@ -186,8 +186,8 @@ WINDOW *awin;
* or the end of the entire option string.
*/
parse_opts(str)
char *str;
void
parse_opts(char *str)
{
reg char *sp;
reg OPTION *op;
@ -231,9 +231,8 @@ char *str;
/*
* copy string using unctrl for things
*/
strucpy(s1, s2, len)
char *s1, *s2;
int len;
void
strucpy(char *s1, char *s2, int len)
{
reg char *sp;