Samba 3: added Samba 3.0.24 sources
[tomato.git] / release / src / router / samba3 / source / include / xfile.h
blob89fa9d1e1188d81e806010766d41b475427f7f32
1 /*
2 Unix SMB/CIFS implementation.
3 stdio replacement
4 Copyright (C) Andrew Tridgell 2001
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef _XFILE_H_
22 #define _XFILE_H_
24 see xfile.c for explanations
27 typedef struct {
28 int fd;
29 char *buf;
30 char *next;
31 int bufsize;
32 int bufused;
33 int open_flags;
34 int buftype;
35 int flags;
36 } XFILE;
38 extern XFILE *x_stdin, *x_stdout, *x_stderr;
40 /* buffering type */
41 #define X_IOFBF 0
42 #define X_IOLBF 1
43 #define X_IONBF 2
45 #define x_getc(f) x_fgetc(f)
47 int x_vfprintf(XFILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2, 0);
48 int x_fprintf(XFILE *f, const char *format, ...) PRINTF_ATTRIBUTE(2, 3);
49 #endif /* _XFILE_H_ */