Advanced Rogue 7: add and use more md_ functions.

md_fileno() and md_fdopen() are now included.  I still hope to rewrite
everything to use FILE *'s.
This commit is contained in:
John "Elwin" Edwards 2015-08-13 07:38:57 -04:00
parent 916a683bf6
commit 6813e9c5bf
4 changed files with 25 additions and 3 deletions

View file

@ -175,6 +175,26 @@ 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_fileno(FILE *fp)
{
#ifdef _WIN32
return( _fileno(fp) );
#else
return( fileno(fp) );
#endif
}
int
md_creat(char *file, int mode)
{