kolibrios-fun/contrib/sdk/sources/newlib/libc/sys/io.h
Sergey Semyonov (Serge) 7315bb05c0 newlib-2.1.0
git-svn-id: svn://kolibrios.org@4921 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-05-10 22:12:19 +00:00

33 lines
1.1 KiB
C

#define _READ 0x0001 /* file opened for reading */
#define _WRITE 0x0002 /* file opened for writing */
#define _UNGET 0x0004 /* ungetc has been done */
#define _BIGBUF 0x0008 /* big buffer allocated */
#define _EOF 0x0010 /* EOF has occurred */
#define _SFERR 0x0020 /* error has occurred on this file */
#define _APPEND 0x0080 /* file opened for append */
#define _BINARY 0x0040 /* file is binary, skip CRLF processing */
#define _TMPFIL 0x0800 /* this is a temporary file */
#define _DIRTY 0x1000 /* buffer has been modified */
#define _ISTTY 0x2000 /* is console device */
#define _DYNAMIC 0x4000 /* FILE is dynamically allocated */
#define _FILEEXT 0x8000 /* lseek with positive offset has been done */
#define _COMMIT 0x0001 /* extended flag: commit OS buffers on flush */
typedef struct
{
char *name;
unsigned int offset;
int mode;
int lock;
int (*read)(const char *, void *, size_t, size_t, size_t *);
int (*write)(const char*, const void *, size_t, size_t, size_t*);
}__io_handle;
extern __io_handle __io_tab[64];
int __io_alloc();
void __io_free(int handle);