1 /************************************************************************/
2 /*									*/
3 /*  Simple output stream to a particular file descriptor.		*/
4 /*									*/
5 /************************************************************************/
6 
7 #   include	"utilMemoryBuffer.h"
8 #   include	"sioGeneral.h"
9 
10 /************************************************************************/
11 /*									*/
12 /*  Error return values.						*/
13 /*									*/
14 /************************************************************************/
15 
16 #   define	FDerrPERM		(-1)	/* -EPERM		*/
17 #   define	FDerrNOENT		(-2)	/* -ENOENT		*/
18 #   define	FDerrEXIST		(-17)	/* -EXIST		*/
19 #   define	FDerrACCES		(-13)	/* -EACCES		*/
20 #   define	FDerrISDIR		(-21)	/* -EISDIR		*/
21 #   define	FDerrOTHER		(-9999)	/* Unclassified cause	*/
22 
23 /************************************************************************/
24 /*									*/
25 /*  Routine dectarations.						*/
26 /*									*/
27 /************************************************************************/
28 
29 extern SimpleOutputStream * sioOutFdOpen( int		fd );
30 
31 extern SimpleInputStream * sioInFdOpen( int		fd );
32 
33 extern int sioFdOpenFile(		const MemoryBuffer *	filename,
34 					int			read,
35 					int			write,
36 					int			append,
37 					int			create,
38 					int			exclusive );
39 
40 extern int sioFdCloseFile(		int			fd );
41 
42 extern SimpleOutputStream * sioOutFdOpenAt(
43 				    int				fd,
44 				    long			offset );
45 
46 extern SimpleInputStream * sioInFdOpenAt(
47 				    int				fd,
48 				    long			offset );
49 
50