:pserver:cvsanon@mok.lvcm.com:/CVS/ReactOS reactos
[reactos.git] / lib / crtdll / libc / file.h
1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2 #ifndef __dj_include_libc_file_h__
3 #define __dj_include_libc_file_h__
4
5 #include <stdio.h>
6 #include <fcntl.h>
7
8
9 //#include <libc/dosio.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 #ifndef __dj_ENFORCE_ANSI_FREESTANDING
16
17 #ifndef __STRICT_ANSI__
18
19 #ifndef _POSIX_SOURCE
20
21 #ifndef _IORMONCL
22 #define _IORMONCL 004000  /* remove on close, for temp files */
23 #endif
24 /* if _flag & _IORMONCL, ._name_to_remove needs freeing */
25
26 #ifndef _IOUNGETC
27 #define _IOUNGETC 010000  /* there is an ungetc'ed character in the buffer */
28 #endif
29
30 int     _flsbuf(int, FILE*);
31 int     _filbuf(FILE *);
32 void    _fwalk(void (*)(FILE *));
33
34
35
36 char __is_text_file(FILE *p);
37
38 int _doprnt(const char *fmt, va_list args, FILE *f);
39 int _doscan(FILE *iop, const char *fmt, void **argp);
40
41 void *filehnd(int fileno);
42 int __fileno_dup2( int handle1, int handle2 );
43 int __fileno_setmode(int _fd, int _newmode);
44 int     __fileno_close(int _fd);
45
46 #undef  fileno
47 #define fileno(f)       (f->_file)
48 #undef  feof
49 #define feof(f)         (((f)->_flag&_IOEOF)!=0)
50 #undef  ferror
51 #define ferror(f)       (((f)->_flag&_IOERR)!=0)
52
53 #endif /* !_POSIX_SOURCE */
54 #endif /* !__STRICT_ANSI__ */
55 #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
56
57 #ifndef __dj_ENFORCE_FUNCTION_CALLS
58 #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
59
60 #ifdef __cplusplus
61 }
62 #endif
63
64 #endif /* __dj_include_libc_file_h__ */