Mercurial > hg > early-roguelike
comparison rogue4/save.c @ 13:63b9fd7d70ce
rogue4: add -n option and system savedir
author | edwarj4 |
---|---|
date | Sat, 31 Oct 2009 01:51:52 +0000 |
parents | 9535a08ddc39 |
children | e7dc81b41168 |
comparison
equal
deleted
inserted
replaced
12:9535a08ddc39 | 13:63b9fd7d70ce |
---|---|
195 signal(SIGTSTP, SIG_IGN); | 195 signal(SIGTSTP, SIG_IGN); |
196 #endif | 196 #endif |
197 | 197 |
198 if ((inf = open(file, 0)) < 0) | 198 if ((inf = open(file, 0)) < 0) |
199 { | 199 { |
200 if (use_savedir && errno == ENOENT) | |
201 { | |
202 /* We're using a system savefile which doesn't exist. | |
203 This isn't a fatal error, it means start a new game. */ | |
204 return TRUE; | |
205 } | |
200 perror(file); | 206 perror(file); |
201 return FALSE; | 207 return FALSE; |
202 } | 208 } |
203 | 209 |
204 fflush(stdout); | 210 fflush(stdout); |