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:
parent
916a683bf6
commit
6813e9c5bf
4 changed files with 25 additions and 3 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue