HTML Tidy  5.7.0
The HTACG Tidy HTML Project
Document Save Functions

Detailed Description

Save currently parsed document to the given output sink.

File name and string/buffer functions provided for convenience.

Functions

int TIDY_CALL tidyOptSaveFile (TidyDoc tdoc, ctmbstr cfgfil)
 Save current settings to named file. More...
 
int TIDY_CALL tidyOptSaveSink (TidyDoc tdoc, TidyOutputSink *sink)
 Save current settings to given output sink. More...
 
int TIDY_CALL tidySaveBuffer (TidyDoc tdoc, TidyBuffer *buf)
 Save the tidy document to given TidyBuffer object. More...
 
int TIDY_CALL tidySaveFile (TidyDoc tdoc, ctmbstr filename)
 Save the tidy document to the named file. More...
 
int TIDY_CALL tidySaveSink (TidyDoc tdoc, TidyOutputSink *sink)
 Save to given generic output sink. More...
 
int TIDY_CALL tidySaveStdout (TidyDoc tdoc)
 Save the tidy document to standard output (FILE*). More...
 
int TIDY_CALL tidySaveString (TidyDoc tdoc, tmbstr buffer, uint *buflen)
 Save the tidy document to an application buffer. More...
 

Function Documentation

int TIDY_CALL tidyOptSaveFile ( TidyDoc  tdoc,
ctmbstr  cfgfil 
)

Save current settings to named file.

Only writes non-default values.

Returns
An integer representing the status.
Parameters
tdocThe tidy document to save.
cfgfilThe filename to save the configuration to.
int TIDY_CALL tidyOptSaveSink ( TidyDoc  tdoc,
TidyOutputSink sink 
)

Save current settings to given output sink.

Only non-default values are written.

Returns
An integer representing the status.
Parameters
tdocThe tidy document to save.
sinkThe output sink to save the configuration to.
int TIDY_CALL tidySaveBuffer ( TidyDoc  tdoc,
TidyBuffer *  buf 
)

Save the tidy document to given TidyBuffer object.

Returns
An integer representing the status.
Parameters
tdocThe tidy document to save.
bufThe buffer to place the output.
int TIDY_CALL tidySaveFile ( TidyDoc  tdoc,
ctmbstr  filename 
)

Save the tidy document to the named file.

Returns
An integer representing the status.
Parameters
tdocThe tidy document to save.
filenameThe destination file name.
int TIDY_CALL tidySaveSink ( TidyDoc  tdoc,
TidyOutputSink sink 
)

Save to given generic output sink.

Returns
An integer representing the status.
Parameters
tdocThe tidy document to save.
sinkThe output sink to save to.
int TIDY_CALL tidySaveStdout ( TidyDoc  tdoc)

Save the tidy document to standard output (FILE*).

Parameters
tdocThe tidy document to save.
Returns
An integer representing the status.
int TIDY_CALL tidySaveString ( TidyDoc  tdoc,
tmbstr  buffer,
uint buflen 
)

Save the tidy document to an application buffer.

If TidyShowMarkup and the document has no errors, or TidyForceOutput, then the current document (per the current configuration) will be pretty printed to this application buffer. The document byte length (not character length) will be placed into *buflen. The document will not be null terminated. If the buffer is not big enough, ENOMEM will be returned, else the actual document status.

Returns
An integer representing the status.
Parameters
tdocThe tidy document to save.
bufferThe buffer to save to.
[out]buflenThe byte length written.