Mercurial > hg > early-roguelike
diff srogue/state.c @ 217:94a0d9dd5ce1
Super-Rogue: convert to ANSI-style function declarations.
This fixes most of the build warnings.
author | John "Elwin" Edwards |
---|---|
date | Sun, 31 Jan 2016 13:45:07 -0500 |
parents | 09db0cf536af |
children | 696277507a2e |
line wrap: on
line diff
--- a/srogue/state.c Thu Jan 28 18:55:47 2016 -0500 +++ b/srogue/state.c Sun Jan 31 13:45:07 2016 -0500 @@ -70,6 +70,9 @@ #define READSTAT ((format_error == 0) && (read_error == 0)) #define WRITESTAT (write_error == 0) +int rs_read_int(int inf, int *i); +int rs_write_int(FILE *savef, int c); + int read_error = FALSE; int write_error = FALSE; int format_error = FALSE; @@ -82,10 +85,8 @@ /* * perform an encrypted write */ -encwrite(starta, size, outf) -register void *starta; -unsigned int size; -register FILE *outf; +void +encwrite(void *starta, unsigned int size, FILE *outf) { register char *ep; register char *start = starta; @@ -103,10 +104,8 @@ /* * perform an encrypted read */ -encread(starta, size, inf) -register void *starta; -unsigned int size; -register int inf; +int +encread(void *starta, unsigned int size, int inf) { register char *ep; register int read_size; @@ -1556,6 +1555,7 @@ } } +int rs_read_traps(int inf, struct trap *trap, int count) { int id = 0, value = 0, n = 0; @@ -1885,8 +1885,8 @@ return(READSTAT); } -rs_fix_monster_list(list) -struct linked_list *list; +void +rs_fix_monster_list(struct linked_list *list) { struct linked_list *item; @@ -1970,6 +1970,7 @@ return(WRITESTAT); } +int rs_read_object_reference(int inf, struct linked_list *list, struct object **item) { @@ -2225,6 +2226,7 @@ return(WRITESTAT); } +int rs_restore_file(int inf) { bool junk;