comparison srogue/save.c @ 304:e52a8a7ad4c5

Fix many compiler warnings. There should only be two changes in behavior: arogue7/fight.c, arogue7/fight.c: a to-hit bonus is now correctly applied to characters who are not monks instead of monks who are not empty-handed. urogue/fight.c: fixed an interaction with the "debug" macro that could cause the wrong message to be displayed.
author John "Elwin" Edwards
date Wed, 14 Apr 2021 18:55:33 -0400
parents 70aa5808c782
children
comparison
equal deleted inserted replaced
303:e06ebc407615 304:e52a8a7ad4c5
53 * Save the current game 53 * Save the current game
54 */ 54 */
55 bool 55 bool
56 save_game(void) 56 save_game(void)
57 { 57 {
58 reg FILE *savef;
59 reg int c; 58 reg int c;
60 char buf[LINLEN]; 59 char buf[LINLEN];
61 60
62 mpos = 0; 61 mpos = 0;
63 if (file_name[0] != '\0') { 62 if (file_name[0] != '\0') {
189 * Restore a saved game from a file 188 * Restore a saved game from a file
190 */ 189 */
191 bool 190 bool
192 restore(char *file, char **envp) 191 restore(char *file, char **envp)
193 { 192 {
194 register int pid;
195 int ret_status;
196 #ifndef _AIX 193 #ifndef _AIX
197 extern char **environ; 194 extern char **environ;
198 #endif 195 #endif
199 #ifdef __DJGPP__ /* st_ino w/ DJGPP under WinXP broken */ 196 #ifdef __DJGPP__ /* st_ino w/ DJGPP under WinXP broken */
200 _djstat_flags |= _STAT_INODE; /* so turn off computing it for now */ 197 _djstat_flags |= _STAT_INODE; /* so turn off computing it for now */
303 strcpy(file_name, file); 300 strcpy(file_name, file);
304 setup(); 301 setup();
305 restscr(cw); 302 restscr(cw);
306 md_srandom(md_random_seed()); 303 md_srandom(md_random_seed());
307 playit(); 304 playit();
308 } 305 return FALSE;
306 }