1 #ifndef __FILEIO_H__
2 #define __FILEIO_H__
3 
4 /** @file fileio.h - does standard C I/O
5 
6   Implementation of a FILE* based TidyInputSource and
7   TidyOutputSink.
8 
9   (c) 1998-2007 (W3C) MIT, ERCIM, Keio University
10   See tidy.h for the copyright notice.
11 
12   CVS Info:
13     $Author: arnaud02 $
14     $Date: 2007/05/30 16:47:31 $
15     $Revision: 1.8 $
16 */
17 
18 #include "buffio.h"
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /** Allocate and initialize file input source */
24 int TY_(initFileSource)( TidyAllocator *allocator, TidyInputSource* source, FILE* fp );
25 
26 /** Free file input source */
27 void TY_(freeFileSource)( TidyInputSource* source, Bool closeIt );
28 
29 #if SUPPORT_POSIX_MAPPED_FILES
30 /** Allocate and initialize file input source using Standard C I/O */
31 int TY_(initStdIOFileSource)( TidyAllocator *allocator, TidyInputSource* source, FILE* fp );
32 
33 /** Free file input source using Standard C I/O */
34 void TY_(freeStdIOFileSource)( TidyInputSource* source, Bool closeIt );
35 #endif
36 
37 /** Initialize file output sink */
38 void TY_(initFileSink)( TidyOutputSink* sink, FILE* fp );
39 
40 /* Needed for internal declarations */
41 void TIDY_CALL TY_(filesink_putByte)( void* sinkData, byte bv );
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 #endif /* __FILEIO_H__ */
47