srogue: add and use md_fdopen().
The implementation was copied from rogue4. Using fdopen() is necessary because the scorefile needs both encread() and encwrite(). For some reason I have failed to discover, one of them uses FILE *'s and the other uses file descriptors.
This commit is contained in:
parent
e857a2cec6
commit
00142507db
3 changed files with 12 additions and 1 deletions
|
|
@ -358,6 +358,16 @@ md_unlink(char *file)
|
|||
#endif
|
||||
}
|
||||
|
||||
FILE *
|
||||
md_fdopen(int fd, char *mode)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return( _fdopen(fd, mode) );
|
||||
#else
|
||||
return( fdopen(fd, mode) );
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
md_chmod(const char *filename, int mode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue