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:
John "Elwin" Edwards 2015-08-03 09:27:43 -04:00
parent e857a2cec6
commit 00142507db
3 changed files with 12 additions and 1 deletions

View file

@ -40,6 +40,7 @@ int md_chmod(const char *filename, int mode);
char *md_crypt(const char *key, const char *salt);
int md_dsuspchar(void);
int md_erasechar(void);
FILE * md_fdopen(int fd, char *mode);
char *md_gethomedir(void);
char *md_getusername(void);
uid_t md_getuid(void);