Wrting to a File using ANSI C
/*
** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH.
*/
It is useful to have both FWriter and Writer for environments in which
fdopen()
doesn't exist for example. The module contains
the following parts:
This module is implemented by HTFWrite.c,
and it is a part of the
W3C Reference Library.
#ifndef HTFWRITE_H
#define HTFWRITE_H
#include "HTStream.h"
#include "HTFormat.h"
This stream simply absorbs data without doing anything what so ever.
extern HTStream * HTBlackHole NOPARAMS;
Converters
This is the set of functions that can be registered as
converters.
#ifndef pyramid
extern HTConverter HTSaveAndExecute, HTSaveLocally, HTSaveAndCallBack,
HTThroughLine;
#endif
Location of Temporary Files
HTSaveAndCallBack
will save to a cache file and call the
request->callback function with the filename as parameter. The
destination for temporary files can be managed by the following
functions:
extern BOOL HTTmp_setRoot PARAMS((CONST char * tmp_root));
extern CONST char * HTTmp_getRoot NOPARAMS;
extern void HTTmp_freeRoot NOPARAMS;
The HTTmp_freeRoot
is called by the HTLibTerminate function. The default
value is defined in HTReq.html
This function puts up a new stream given an open file descripter. If the file
is not to be closed afterwards, then set leave_open = NO.
extern HTStream * HTFWriter_new PARAMS((FILE * fp,
BOOL leave_open));
#endif
End of declaration module