Mercurial > hg > early-roguelike
diff arogue7/save.c @ 219:f9ef86cf22b2
Advanced Rogue 7: convert to ANSI-style function declarations.
Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
author | John "Elwin" Edwards |
---|---|
date | Fri, 19 Feb 2016 21:02:28 -0500 |
parents | aa8e1fc62926 |
children | 3d4252fa2ed3 |
line wrap: on
line diff
--- a/arogue7/save.c Sun Feb 07 14:39:21 2016 -0500 +++ b/arogue7/save.c Fri Feb 19 21:02:28 2016 -0500 @@ -42,6 +42,8 @@ #define ENCWRITE encwrite #endif +bool save_file(int savefd); + typedef struct stat STAT; extern char version[], encstr[]; @@ -51,7 +53,7 @@ STAT sbuf; bool -save_game() +save_game(void) { register int savefd; register int c; @@ -122,8 +124,7 @@ * recieved */ void -auto_save(sig) -int sig; +auto_save(int sig) { register int savefd; register int i; @@ -145,8 +146,7 @@ * write the saved game on the file */ bool -save_file(savefd) -register int savefd; +save_file(int savefd) { register unsigned num_to_write, num_written; FILE *savef; @@ -167,9 +167,8 @@ else return(FALSE); } -restore(file, envp) -register char *file; -char **envp; +bool +restore(char *file, char *envp[]) { register int inf; extern char **environ; @@ -265,10 +264,8 @@ /* * perform an encrypted write */ -encwrite(start, size, outf) -register char *start; -register unsigned size; -register int outf; +int +encwrite(char *start, unsigned int size, int outf) { register char *ep; register int i = 0; @@ -298,10 +295,8 @@ /* * perform an encrypted read */ -encread(start, size, inf) -register char *start; -register unsigned size; -register int inf; +int +encread(char *start, unsigned int size, int inf) { register char *ep; register int read_size;