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... | |
Save current settings to named file.
Only writes non-default values.
tdoc | The tidy document to save. |
cfgfil | The 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.
tdoc | The tidy document to save. |
sink | The output sink to save the configuration to. |
Save the tidy document to given TidyBuffer object.
tdoc | The tidy document to save. |
buf | The buffer to place the output. |
Save the tidy document to the named file.
tdoc | The tidy document to save. |
filename | The destination file name. |
int TIDY_CALL tidySaveSink | ( | TidyDoc | tdoc, |
TidyOutputSink * | sink | ||
) |
Save to given generic output sink.
tdoc | The tidy document to save. |
sink | The output sink to save to. |
Save the tidy document to standard output (FILE*).
tdoc | The tidy document to save. |
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.
tdoc | The tidy document to save. | |
buffer | The buffer to save to. | |
[out] | buflen | The byte length written. |