Mercurial > hg > early-roguelike
comparison rogue4/mdport.c @ 279:d3968e9cb98d
Use C stdio functions for score files and save files.
Switching from Unix file descriptor operations to C standard FILE*
functions will reduce portability problems.
| author | John "Elwin" Edwards |
|---|---|
| date | Fri, 15 Sep 2017 19:57:54 -0400 |
| parents | 3d4252fa2ed3 |
| children | 8b6aba552f6f |
comparison
equal
deleted
inserted
replaced
| 278:c222f9d56776 | 279:d3968e9cb98d |
|---|---|
| 172 fflush(stdout); | 172 fflush(stdout); |
| 173 #endif | 173 #endif |
| 174 } | 174 } |
| 175 | 175 |
| 176 int | 176 int |
| 177 md_unlink_open_file(char *file, int inf) | 177 md_unlink_open_file(char *file, FILE *inf) |
| 178 { | 178 { |
| 179 #ifdef _WIN32 | 179 #ifdef _WIN32 |
| 180 _close(inf); | 180 fclose(inf); |
| 181 _chmod(file, 0600); | 181 _chmod(file, 0600); |
| 182 return( _unlink(file) ); | 182 return( _unlink(file) ); |
| 183 #else | 183 #else |
| 184 return(unlink(file)); | 184 return(unlink(file)); |
| 185 #endif | 185 #endif |
