Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
216:b24545357d2e | 217:94a0d9dd5ce1 |
---|---|
30 #include "rogue.ext" | 30 #include "rogue.ext" |
31 | 31 |
32 EXTCHAR version[]; | 32 EXTCHAR version[]; |
33 EXTCHAR *ctime(); | 33 EXTCHAR *ctime(); |
34 | 34 |
35 bool dosave(void); | |
36 void save_file(FILE *savef); | |
37 | |
35 typedef struct stat STAT; | 38 typedef struct stat STAT; |
36 STAT sbuf; | 39 STAT sbuf; |
37 | 40 |
38 /* | 41 /* |
39 * ignore: | 42 * ignore: |
40 * Ignore ALL signals possible | 43 * Ignore ALL signals possible |
41 */ | 44 */ |
42 ignore() | 45 void |
46 ignore(void) | |
43 { | 47 { |
44 md_ignoreallsignals(); | 48 md_ignoreallsignals(); |
45 } | 49 } |
46 | 50 |
47 /* | 51 /* |
48 * save_game: | 52 * save_game: |
49 * Save the current game | 53 * Save the current game |
50 */ | 54 */ |
51 save_game() | 55 bool |
56 save_game(void) | |
52 { | 57 { |
53 reg FILE *savef; | 58 reg FILE *savef; |
54 reg int c; | 59 reg int c; |
55 char buf[LINLEN]; | 60 char buf[LINLEN]; |
56 | 61 |
134 | 139 |
135 /* | 140 /* |
136 * dosave: | 141 * dosave: |
137 * Save the game. UID/GID no longer get reset here. | 142 * Save the game. UID/GID no longer get reset here. |
138 */ | 143 */ |
139 dosave() | 144 bool |
145 dosave(void) | |
140 { | 146 { |
141 FILE *savef; | 147 FILE *savef; |
142 | 148 |
143 ignore(); | 149 ignore(); |
144 umask(022); | 150 umask(022); |
155 | 161 |
156 /* | 162 /* |
157 * save_file: | 163 * save_file: |
158 * Do the actual save of this game to a file | 164 * Do the actual save of this game to a file |
159 */ | 165 */ |
160 save_file(savef) | 166 void |
161 FILE *savef; | 167 save_file(FILE *savef) |
162 { | 168 { |
163 int slines = LINES; | 169 int slines = LINES; |
164 int scols = COLS; | 170 int scols = COLS; |
165 | 171 |
166 #ifdef __DJGPP__ /* st_ino w/ DJGPP under WinXP broken */ | 172 #ifdef __DJGPP__ /* st_ino w/ DJGPP under WinXP broken */ |
180 | 186 |
181 /* | 187 /* |
182 * restore: | 188 * restore: |
183 * Restore a saved game from a file | 189 * Restore a saved game from a file |
184 */ | 190 */ |
185 restore(file, envp) | 191 bool |
186 char *file, **envp; | 192 restore(char *file, char **envp) |
187 { | 193 { |
188 register inf, pid; | 194 register int inf, pid; |
189 int ret_status; | 195 int ret_status; |
190 #ifndef _AIX | 196 #ifndef _AIX |
191 extern char **environ; | 197 extern char **environ; |
192 #endif | 198 #endif |
193 #ifdef __DJGPP__ /* st_ino w/ DJGPP under WinXP broken */ | 199 #ifdef __DJGPP__ /* st_ino w/ DJGPP under WinXP broken */ |