Mercurial > hg > early-roguelike
diff srogue/save.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 | 3de8058dd549 |
children | 163bd1fd4766 |
line wrap: on
line diff
--- a/srogue/save.c Thu Jan 28 18:55:47 2016 -0500 +++ b/srogue/save.c Sun Jan 31 13:45:07 2016 -0500 @@ -32,6 +32,9 @@ EXTCHAR version[]; EXTCHAR *ctime(); +bool dosave(void); +void save_file(FILE *savef); + typedef struct stat STAT; STAT sbuf; @@ -39,7 +42,8 @@ * ignore: * Ignore ALL signals possible */ -ignore() +void +ignore(void) { md_ignoreallsignals(); } @@ -48,7 +52,8 @@ * save_game: * Save the current game */ -save_game() +bool +save_game(void) { reg FILE *savef; reg int c; @@ -136,7 +141,8 @@ * dosave: * Save the game. UID/GID no longer get reset here. */ -dosave() +bool +dosave(void) { FILE *savef; @@ -157,8 +163,8 @@ * save_file: * Do the actual save of this game to a file */ -save_file(savef) -FILE *savef; +void +save_file(FILE *savef) { int slines = LINES; int scols = COLS; @@ -182,10 +188,10 @@ * restore: * Restore a saved game from a file */ -restore(file, envp) -char *file, **envp; +bool +restore(char *file, char **envp) { - register inf, pid; + register int inf, pid; int ret_status; #ifndef _AIX extern char **environ;