Mercurial > hg > early-roguelike
diff srogue/rogue.h @ 190:f4f6734771e0
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.
author | John "Elwin" Edwards |
---|---|
date | Mon, 03 Aug 2015 09:27:43 -0400 |
parents | 10c273a62228 |
children | fb25a62680c7 |
line wrap: on
line diff
--- a/srogue/rogue.h Mon Aug 03 09:05:15 2015 -0400 +++ b/srogue/rogue.h Mon Aug 03 09:27:43 2015 -0400 @@ -40,6 +40,7 @@ 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);