From c66bb848f232e24e10a19851264f9e4c24d2237f Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sat, 13 Feb 2016 18:34:36 +0100 Subject: [PATCH] Improve tidySaveString API documentation. This was suggested by Kevin Locke back in SF bug 917 Nov, 2009. Has taken some time to filter through! --- include/tidy.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/tidy.h b/include/tidy.h index f20e12d..0eeabca 100755 --- a/include/tidy.h +++ b/include/tidy.h @@ -744,9 +744,13 @@ TIDY_EXPORT int TIDY_CALL tidySaveStdout( TidyDoc tdoc ); /** Save to given TidyBuffer object */ TIDY_EXPORT int TIDY_CALL tidySaveBuffer( TidyDoc tdoc, TidyBuffer* buf ); -/** Save document to application buffer. If buffer is not big enough, -** ENOMEM will be returned and the necessary buffer size will be placed -** in *buflen. +/** Save document to application buffer. If TidyShowMarkup and +** the document has no errors, or TidyForceOutput, the current +** document, per the current configuration, will be Pretty Printed +** to the application buffer. The document byte length, +** not character length, will be placed in *buflen. The document +** will not be null terminated. If the buffer is not big enough, +** ENOMEM will be returned, else the actual document status. */ TIDY_EXPORT int TIDY_CALL tidySaveString( TidyDoc tdoc, tmbstr buffer, uint* buflen );