mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 00:12:57 +00:00
incorporated changes from dekker
svn path=/trunk/; revision=205
This commit is contained in:
parent
9bcc89126c
commit
d4195242ff
1 changed files with 7 additions and 10 deletions
|
@ -12,12 +12,10 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
//#include <libc/file.h>
|
#include <libc/file.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <share.h>
|
#include <share.h>
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
typedef struct _fileno_modes_type
|
typedef struct _fileno_modes_type
|
||||||
{
|
{
|
||||||
HANDLE hFile;
|
HANDLE hFile;
|
||||||
|
@ -25,14 +23,18 @@ typedef struct _fileno_modes_type
|
||||||
int fd;
|
int fd;
|
||||||
} fileno_modes_type;
|
} fileno_modes_type;
|
||||||
|
|
||||||
extern fileno_modes_type *fileno_modes;
|
fileno_modes_type *fileno_modes = NULL;
|
||||||
|
|
||||||
|
int maxfno = 5;
|
||||||
|
int minfno = 5;
|
||||||
|
|
||||||
char __is_text_file(FILE *p) {
|
char __is_text_file(FILE *p) {
|
||||||
|
if ( p == NULL || fileno_modes == NULL )
|
||||||
|
return FALSE;
|
||||||
return (!((p)->_flag&_IOSTRG) && (fileno_modes[(p)->_file].mode&O_TEXT));
|
return (!((p)->_flag&_IOSTRG) && (fileno_modes[(p)->_file].mode&O_TEXT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern int maxfno;
|
|
||||||
|
|
||||||
|
|
||||||
int __fileno_alloc(HANDLE hFile, int mode);
|
int __fileno_alloc(HANDLE hFile, int mode);
|
||||||
|
@ -123,10 +125,6 @@ _O_TEXT Opens file in text (translated) mode. (For more information, see Text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fileno_modes_type *fileno_modes = NULL;
|
|
||||||
|
|
||||||
int maxfno = 5;
|
|
||||||
int minfno = 5;
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -254,4 +252,3 @@ int _open_osfhandle (void *osfhandle, int flags )
|
||||||
{
|
{
|
||||||
return __fileno_alloc((HANDLE)osfhandle, flags);
|
return __fileno_alloc((HANDLE)osfhandle, flags);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue