HTML Tidy  5.6.0
The HTACG Tidy HTML Project
I/O and Messages

Detailed Description

Tidy provides flexible I/O.

By default, Tidy will define, create and use instances of input and output handlers for standard C buffered I/O (i.e., FILE* stdin, FILE* stdout, and FILE* stderr for content input, content output and diagnostic output, respectively. A FILE* cfgFile input handler will be used for config files. Command line options will just be set directly.

Data Structures

struct  TidyBuffer
 A TidyBuffer is chunk of memory that can be used for multiple I/O purposes within Tidy. More...
 
struct  TidyInputSource
 This type defines an input source capable of delivering raw bytes of input. More...
 
struct  TidyOutputSink
 This type defines an output destination capable of accepting raw bytes of output. More...
 

Input Source

If you wish to write to your own input sources, then these types, structs, and functions will allow them to work seamlessly with Tidy.

typedef int(TIDY_CALLTidyGetByteFunc) (void *sourceData)
 Input Callback: get next byte of input. More...
 
typedef void(TIDY_CALLTidyUngetByteFunc) (void *sourceData, byte bt)
 Input Callback: unget a byte of input. More...
 
typedef Bool(TIDY_CALLTidyEOFFunc) (void *sourceData)
 Input Callback: is end of input? More...
 
Bool TIDY_CALL tidyInitSource (TidyInputSource *source, void *srcData, TidyGetByteFunc gbFunc, TidyUngetByteFunc ugbFunc, TidyEOFFunc endFunc)
 Facilitates user defined source by providing an entry point to marshal pointers-to-functions. More...
 
uint TIDY_CALL tidyGetByte (TidyInputSource *source)
 Helper: get next byte from input source. More...
 
void TIDY_CALL tidyUngetByte (TidyInputSource *source, uint byteValue)
 Helper: unget byte back to input source. More...
 
Bool TIDY_CALL tidyIsEOF (TidyInputSource *source)
 Helper: check if input source at end. More...
 
#define EndOfStream   (~0u)
 End of input "character". More...
 

Output Sink

typedef void(TIDY_CALLTidyPutByteFunc) (void *sinkData, byte bt)
 Output callback: send a byte to output. More...
 
Bool TIDY_CALL tidyInitSink (TidyOutputSink *sink, void *snkData, TidyPutByteFunc pbFunc)
 Facilitates user defined sinks by providing an entry point to marshal pointers-to-functions. More...
 
void TIDY_CALL tidyPutByte (TidyOutputSink *sink, uint byteValue)
 Helper: send a byte to output. More...
 

Emacs-compatible reporting support.

If you work with Emacs and prefer Tidy's report output to be in a form that is easy for Emacs to parse, then these functions may be valuable.

void TIDY_CALL tidySetEmacsFile (TidyDoc tdoc, ctmbstr filePath)
 Set the file path to use for reports when TidyEmacs is being used. More...
 
ctmbstr TIDY_CALL tidyGetEmacsFile (TidyDoc tdoc)
 Get the file path to use for reports when TidyEmacs is being used. More...
 

Error Sink

Send Tidy's output to any of several destinations with these functions.

FILE *TIDY_CALL tidySetErrorFile (TidyDoc tdoc, ctmbstr errfilnam)
 Set error sink to named file. More...
 
int TIDY_CALL tidySetErrorBuffer (TidyDoc tdoc, TidyBuffer *errbuf)
 Set error sink to given buffer. More...
 
int TIDY_CALL tidySetErrorSink (TidyDoc tdoc, TidyOutputSink *sink)
 Set error sink to given generic sink. More...
 

Error and Message Callbacks - TidyReportFilter

A simple callback to filter or collect messages by diagnostic level, for example, TidyInfo, TidyWarning, etc.

Its name reflects its original purpose as a filter, by which your application can inform LibTidy whether or not to output a particular report.

typedef Bool(TIDY_CALLTidyReportFilter) (TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr mssg)
 This typedef represents the required signature for your provided callback function should you wish to register one with tidySetReportFilter(). More...
 
Bool TIDY_CALL tidySetReportFilter (TidyDoc tdoc, TidyReportFilter filtCallback)
 This function informs Tidy to use the specified callback to send reports. More...
 

Error and Message Callbacks - TidyReportCallback

A simple callback to filter or collect messages reported by Tidy.

Unlike TidyReportFilter, more data are provided (including a va_list), making this callback suitable for applications that provide more sophisticated handling of reports.

Remarks
The use of a va_list may preclude using this callback from non-C-like languages, which is uncharacteristic of Tidy. For more flexibility, consider using TidyMessageCallback instead.
Note
This callback was previously TidyMessageFilter3 in older versions of LibTidy.
typedef Bool(TIDY_CALLTidyReportCallback) (TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr code, va_list args)
 This typedef represents the required signature for your provided callback function should you wish to register one with tidySetReportCallback(). More...
 
Bool TIDY_CALL tidySetReportCallback (TidyDoc tdoc, TidyReportCallback filtCallback)
 This function informs Tidy to use the specified callback to send reports. More...
 

Error and Message Callbacks - TidyMessageCallback

A sophisticated and extensible callback to filter or collect messages reported by Tidy.

It returns only an opaque type TidyMessage for every report and dialogue message, and this message can be queried with the TidyMessageCallback API, below. Note that unlike the older filters, this callback exposes all output that LibTidy emits (excluding the console application, which is a client of LibTidy).

typedef Bool(TIDY_CALLTidyMessageCallback) (TidyMessage tmessage)
 This typedef represents the required signature for your provided callback function should you wish to register one with tidySetMessageCallback(). More...
 
Bool TIDY_CALL tidySetMessageCallback (TidyDoc tdoc, TidyMessageCallback filtCallback)
 This function informs Tidy to use the specified callback to send reports. More...
 

TidyMessageCallback API

When using TidyMessageCallback you will be supplied with a TidyMessage object, which is used as a token to be interrogated with the following API before the callback returns.

Remarks
Upon returning from the callback, this object is destroyed so do not attempt to copy it, or keep it around, or use it in any way.
TidyDoc TIDY_CALL tidyGetMessageDoc (TidyMessage tmessage)
 Get the tidy document this message comes from. More...
 
uint TIDY_CALL tidyGetMessageCode (TidyMessage tmessage)
 Get the message code. More...
 
ctmbstr TIDY_CALL tidyGetMessageKey (TidyMessage tmessage)
 Get the message key string. More...
 
int TIDY_CALL tidyGetMessageLine (TidyMessage tmessage)
 Get the line number the message applies to. More...
 
int TIDY_CALL tidyGetMessageColumn (TidyMessage tmessage)
 Get the column the message applies to. More...
 
TidyReportLevel TIDY_CALL tidyGetMessageLevel (TidyMessage tmessage)
 Get the TidyReportLevel of the message. More...
 
Bool TIDY_CALL tidyGetMessageIsMuted (TidyMessage tmessage)
 Get the muted status of the message, that is, whether or not the current configuration indicated that this message should be muted. More...
 
ctmbstr TIDY_CALL tidyGetMessageFormatDefault (TidyMessage tmessage)
 Get the default format string, which is the format string for the message in Tidy's default localization (en_us). More...
 
ctmbstr TIDY_CALL tidyGetMessageFormat (TidyMessage tmessage)
 Get the localized format string. More...
 
ctmbstr TIDY_CALL tidyGetMessageDefault (TidyMessage tmessage)
 Get the message with the format string already completed, in Tidy's default localization. More...
 
ctmbstr TIDY_CALL tidyGetMessage (TidyMessage tmessage)
 Get the message with the format string already completed, in Tidy's current localization. More...
 
ctmbstr TIDY_CALL tidyGetMessagePosDefault (TidyMessage tmessage)
 Get the position part part of the message in the default language. More...
 
ctmbstr TIDY_CALL tidyGetMessagePos (TidyMessage tmessage)
 Get the position part part of the message in the current language. More...
 
ctmbstr TIDY_CALL tidyGetMessagePrefixDefault (TidyMessage tmessage)
 Get the prefix part of a message in the default language. More...
 
ctmbstr TIDY_CALL tidyGetMessagePrefix (TidyMessage tmessage)
 Get the prefix part of a message in the current language. More...
 
ctmbstr TIDY_CALL tidyGetMessageOutputDefault (TidyMessage tmessage)
 Get the complete message as Tidy would emit it in the default localization. More...
 
ctmbstr TIDY_CALL tidyGetMessageOutput (TidyMessage tmessage)
 Get the complete message as Tidy would emit it in the current localization. More...
 

TidyMessageCallback Arguments API

When using TidyMessageCallback you will be supplied with a TidyMessage object which can be used as a token against which to query using this API.

This API deals strictly with arguments that a message may or may not have; these are the same arguments that Tidy would apply to a format string in order to fill in the placeholder fields and deliver a complete report or dialogue string to you.

TidyIterator TIDY_CALL tidyGetMessageArguments (TidyMessage tmessage)
 Initiates an iterator for a list of arguments related to a given message. More...
 
TidyMessageArgument TIDY_CALL tidyGetNextMessageArgument (TidyMessage tmessage, TidyIterator *iter)
 Given a valid TidyIterator initiated with tidyGetMessageArguments(), returns an instance of the opaque type TidyMessageArgument, which serves as a token against which the remaining argument API functions may be used to query information. More...
 
TidyFormatParameterType TIDY_CALL tidyGetArgType (TidyMessage tmessage, TidyMessageArgument *arg)
 Returns the TidyFormatParameterType of the given message argument. More...
 
ctmbstr TIDY_CALL tidyGetArgFormat (TidyMessage tmessage, TidyMessageArgument *arg)
 Returns the format specifier of the given message argument. More...
 
ctmbstr TIDY_CALL tidyGetArgValueString (TidyMessage tmessage, TidyMessageArgument *arg)
 Returns the string value of the given message argument. More...
 
uint TIDY_CALL tidyGetArgValueUInt (TidyMessage tmessage, TidyMessageArgument *arg)
 Returns the unsigned integer value of the given message argument. More...
 
int TIDY_CALL tidyGetArgValueInt (TidyMessage tmessage, TidyMessageArgument *arg)
 Returns the integer value of the given message argument. More...
 
double TIDY_CALL tidyGetArgValueDouble (TidyMessage tmessage, TidyMessageArgument *arg)
 Returns the double value of the given message argument. More...
 

Printing

LibTidy applications can somewhat track the progress of the tidying process by using this provided callback.

It relates where something in the source document ended up in the output.

typedef void(TIDY_CALLTidyPPProgress) (TidyDoc tdoc, uint line, uint col, uint destLine)
 This typedef represents the required signature for your provided callback function should you wish to register one with tidySetMessageCallback(). More...
 
Bool TIDY_CALL tidySetPrettyPrinterCallback (TidyDoc tdoc, TidyPPProgress callback)
 This function informs Tidy to use the specified callback for tracking the pretty-printing process progress. More...
 

Data Structure Documentation

struct _TidyBuffer

A TidyBuffer is chunk of memory that can be used for multiple I/O purposes within Tidy.

Data Fields
uint allocated Number of bytes allocated.
TidyAllocator * allocator Memory allocator.
byte * bp Pointer to bytes.
uint next Offset of current input position.
uint size Number of bytes currently in use.
struct TidyInputSource

This type defines an input source capable of delivering raw bytes of input.

Data Fields
TidyEOFFunc eof Pointer to "eof" callback.
TidyGetByteFunc getByte Pointer to "get byte" callback.
void * sourceData Input context.

Passed to callbacks.

TidyUngetByteFunc ungetByte Pointer to "unget" callback.
struct TidyOutputSink

This type defines an output destination capable of accepting raw bytes of output.

Data Fields
TidyPutByteFunc putByte Pointer to "put byte" callback.
void * sinkData Output context.

Passed to callbacks.

Macro Definition Documentation

#define EndOfStream   (~0u)

End of input "character".

Typedef Documentation

typedef Bool(TIDY_CALL * TidyEOFFunc) (void *sourceData)

Input Callback: is end of input?

typedef int(TIDY_CALL * TidyGetByteFunc) (void *sourceData)

Input Callback: get next byte of input.

typedef Bool(TIDY_CALL * TidyMessageCallback) (TidyMessage tmessage)

This typedef represents the required signature for your provided callback function should you wish to register one with tidySetMessageCallback().

Your callback function will be provided with the following parameters.

Parameters
tmessageAn opaque type used as a token against which other API calls can be made.
Returns
Your callback function will return yes if Tidy should include the report in its own output sink, or no if Tidy should suppress it.
typedef void(TIDY_CALL * TidyPPProgress) (TidyDoc tdoc, uint line, uint col, uint destLine)

This typedef represents the required signature for your provided callback function should you wish to register one with tidySetMessageCallback().

Your callback function will be provided with the following parameters.

Parameters
tdocIndicates the source tidy document.
lineIndicates the line in the source document at this point in the process.
colIndicates the column in the source document at this point in the process.
destLineIndicates the line number in the output document at this point in the process.
typedef void(TIDY_CALL * TidyPutByteFunc) (void *sinkData, byte bt)

Output callback: send a byte to output.

typedef Bool(TIDY_CALL * TidyReportCallback) (TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr code, va_list args)

This typedef represents the required signature for your provided callback function should you wish to register one with tidySetReportCallback().

Your callback function will be provided with the following parameters.

Parameters
tdocIndicates the tidy document the message comes from.
lvlSpecifies the TidyReportLevel of the message.
lineIndicates the line number in the source document the message applies to.
colIndicates the column in the source document the message applies to.
codeSpecifies the message code representing the message. Note that this code is a string value that the API promises to hold constant, as opposed to an enum value that can change at any time. Although this is intended so that you can look up your own application's strings, you can retrieve Tidy's format string with this code by using tidyErrorCodeFromKey() and then the tidyLocalizedString() family of functions.
argsIs a va_list of arguments used to fill Tidy's message format string.
Returns
Your callback function will return yes if Tidy should include the report in its own output sink, or no if Tidy should suppress it.
typedef Bool(TIDY_CALL * TidyReportFilter) (TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr mssg)

This typedef represents the required signature for your provided callback function should you wish to register one with tidySetReportFilter().

Your callback function will be provided with the following parameters.

Parameters
tdocIndicates the tidy document the message comes from.
lvlSpecifies the TidyReportLevel of the message.
lineIndicates the line number in the source document the message applies to.
colIndicates the column in the source document the message applies to.
mssgSpecifies the complete message as Tidy would emit it.
Returns
Your callback function will return yes if Tidy should include the report in its own output sink, or no if Tidy should suppress it.
typedef void(TIDY_CALL * TidyUngetByteFunc) (void *sourceData, byte bt)

Input Callback: unget a byte of input.

Function Documentation

ctmbstr TIDY_CALL tidyGetArgFormat ( TidyMessage  tmessage,
TidyMessageArgument arg 
)

Returns the format specifier of the given message argument.

The memory for this string is cleared upon termination of the callback, so do be sure to make your own copy.

Returns
Returns the format specifier string of the given argument.
Parameters
tmessageThe message whose arguments you want to access.
argThe argument that you are querying.
TidyFormatParameterType TIDY_CALL tidyGetArgType ( TidyMessage  tmessage,
TidyMessageArgument arg 
)

Returns the TidyFormatParameterType of the given message argument.

Returns
Returns the type of parameter of type TidyFormatParameterType.
Parameters
tmessageThe message whose arguments you want to access.
argThe argument that you are querying.
double TIDY_CALL tidyGetArgValueDouble ( TidyMessage  tmessage,
TidyMessageArgument arg 
)

Returns the double value of the given message argument.

An assertion will be generated if the argument type is not a double.

Returns
Returns the double value of the given argument.
Parameters
tmessageThe message whose arguments you want to access.
argThe argument that you are querying.
int TIDY_CALL tidyGetArgValueInt ( TidyMessage  tmessage,
TidyMessageArgument arg 
)

Returns the integer value of the given message argument.

An assertion will be generated if the argument type is not an integer.

Returns
Returns the integer value of the given argument.
Parameters
tmessageThe message whose arguments you want to access.
argThe argument that you are querying.
ctmbstr TIDY_CALL tidyGetArgValueString ( TidyMessage  tmessage,
TidyMessageArgument arg 
)

Returns the string value of the given message argument.

An assertion will be generated if the argument type is not a string.

Returns
Returns the string value of the given argument.
Parameters
tmessageThe message whose arguments you want to access.
argThe argument that you are querying.
uint TIDY_CALL tidyGetArgValueUInt ( TidyMessage  tmessage,
TidyMessageArgument arg 
)

Returns the unsigned integer value of the given message argument.

An assertion will be generated if the argument type is not an unsigned int.

Returns
Returns the unsigned integer value of the given argument.
Parameters
tmessageThe message whose arguments you want to access.
argThe argument that you are querying.
uint TIDY_CALL tidyGetByte ( TidyInputSource source)

Helper: get next byte from input source.

Parameters
sourceA pointer to your input source.
Returns
Returns a byte as an unsigned integer.
ctmbstr TIDY_CALL tidyGetEmacsFile ( TidyDoc  tdoc)

Get the file path to use for reports when TidyEmacs is being used.

This function provides a proper interface for using the hidden, internal-only TidyEmacsFile configuration option.

Parameters
tdocThe tidy document for which you want to fetch the file path.
Returns
Returns a string indicating the file path.
ctmbstr TIDY_CALL tidyGetMessage ( TidyMessage  tmessage)

Get the message with the format string already completed, in Tidy's current localization.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the message in the current localization.
TidyIterator TIDY_CALL tidyGetMessageArguments ( TidyMessage  tmessage)

Initiates an iterator for a list of arguments related to a given message.

This iterator allows you to iterate through all of the arguments, if any. In order to iterate through the arguments, initiate the iterator with this function, and then use tidyGetNextMessageArgument() to retrieve the first and subsequent arguments. For example:

TidyIterator itArg = tidyGetMessageArguments( tmessage );
while ( itArg ) {
TidyMessageArgument my_arg = tidyGetNextMessageArgument( tmessage, &itArg );
// do something with my_arg, such as inspect its value or format
}
Parameters
tmessageThe message about whose arguments you wish to query.
Returns
Returns a TidyIterator, which is a token used to represent the current position in a list within LibTidy.
uint TIDY_CALL tidyGetMessageCode ( TidyMessage  tmessage)

Get the message code.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns a code representing the message. This code can be used directly with the localized strings API; however we never make any guarantees about the value of these codes. For code stability don't store this value in your own application. Instead use the enum field or use the message key string value.
int TIDY_CALL tidyGetMessageColumn ( TidyMessage  tmessage)

Get the column the message applies to.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the column number, if any, that generated the message.
ctmbstr TIDY_CALL tidyGetMessageDefault ( TidyMessage  tmessage)

Get the message with the format string already completed, in Tidy's default localization.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the message in the default localization.
TidyDoc TIDY_CALL tidyGetMessageDoc ( TidyMessage  tmessage)

Get the tidy document this message comes from.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the TidyDoc that generated the message.
ctmbstr TIDY_CALL tidyGetMessageFormat ( TidyMessage  tmessage)

Get the localized format string.

If a localized version of the format string doesn't exist, then the default version will be returned.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the localized format string of the message.
ctmbstr TIDY_CALL tidyGetMessageFormatDefault ( TidyMessage  tmessage)

Get the default format string, which is the format string for the message in Tidy's default localization (en_us).

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the default localization format string of the message.
Bool TIDY_CALL tidyGetMessageIsMuted ( TidyMessage  tmessage)

Get the muted status of the message, that is, whether or not the current configuration indicated that this message should be muted.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns a Bool indicating that the config indicates muting this message.
ctmbstr TIDY_CALL tidyGetMessageKey ( TidyMessage  tmessage)

Get the message key string.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns a string representing the message. This string is intended to be stable by the LibTidy API, and is suitable for use as a key in your own applications.
TidyReportLevel TIDY_CALL tidyGetMessageLevel ( TidyMessage  tmessage)

Get the TidyReportLevel of the message.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns a TidyReportLevel indicating the severity or status of the message.
int TIDY_CALL tidyGetMessageLine ( TidyMessage  tmessage)

Get the line number the message applies to.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the line number, if any, that generated the message.
ctmbstr TIDY_CALL tidyGetMessageOutput ( TidyMessage  tmessage)

Get the complete message as Tidy would emit it in the current localization.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the complete message just as Tidy would display it on the console.
ctmbstr TIDY_CALL tidyGetMessageOutputDefault ( TidyMessage  tmessage)

Get the complete message as Tidy would emit it in the default localization.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the complete message just as Tidy would display it on the console.
ctmbstr TIDY_CALL tidyGetMessagePos ( TidyMessage  tmessage)

Get the position part part of the message in the current language.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the positional part of a string as Tidy would display it in the console application.
ctmbstr TIDY_CALL tidyGetMessagePosDefault ( TidyMessage  tmessage)

Get the position part part of the message in the default language.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the positional part of a string as Tidy would display it in the console application.
ctmbstr TIDY_CALL tidyGetMessagePrefix ( TidyMessage  tmessage)

Get the prefix part of a message in the current language.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the message prefix part of a string as Tidy would display it in the console application.
ctmbstr TIDY_CALL tidyGetMessagePrefixDefault ( TidyMessage  tmessage)

Get the prefix part of a message in the default language.

Parameters
tmessageSpecify the message that you are querying.
Returns
Returns the message prefix part of a string as Tidy would display it in the console application.
TidyMessageArgument TIDY_CALL tidyGetNextMessageArgument ( TidyMessage  tmessage,
TidyIterator *  iter 
)

Given a valid TidyIterator initiated with tidyGetMessageArguments(), returns an instance of the opaque type TidyMessageArgument, which serves as a token against which the remaining argument API functions may be used to query information.

Returns
Returns an instance of TidyMessageArgument.
Parameters
tmessageThe message whose arguments you want to access.
iterThe TidyIterator (initiated with tidyOptGetDocLinksList()) token.
Bool TIDY_CALL tidyInitSink ( TidyOutputSink sink,
void *  snkData,
TidyPutByteFunc  pbFunc 
)

Facilitates user defined sinks by providing an entry point to marshal pointers-to-functions.

This is needed by .NET, and possibly other language bindings.

Returns
Returns a bool indicating success or failure.
Parameters
sinkThe sink to populate with data.
snkDataThe output context.
pbFuncPointer to the "put byte" callback function.
Bool TIDY_CALL tidyInitSource ( TidyInputSource source,
void *  srcData,
TidyGetByteFunc  gbFunc,
TidyUngetByteFunc  ugbFunc,
TidyEOFFunc  endFunc 
)

Facilitates user defined source by providing an entry point to marshal pointers-to-functions.

This is needed by .NET, and possibly other language bindings.

Returns
Returns a bool indicating success or failure.
Parameters
sourceThe source to populate with data.
srcDataThe input context.
gbFuncPointer to the "get byte" callback.
ugbFuncPointer to the "unget" callback.
endFuncPointer to the "eof" callback.
Bool TIDY_CALL tidyIsEOF ( TidyInputSource source)

Helper: check if input source at end.

Parameters
sourceThe input source.
Returns
Returns a bool indicating whether or not the source is at EOF.
void TIDY_CALL tidyPutByte ( TidyOutputSink sink,
uint  byteValue 
)

Helper: send a byte to output.

Parameters
sinkThe output sink to send a byte.
byteValueThe byte to be sent.
void TIDY_CALL tidySetEmacsFile ( TidyDoc  tdoc,
ctmbstr  filePath 
)

Set the file path to use for reports when TidyEmacs is being used.

This function provides a proper interface for using the hidden, internal-only TidyEmacsFile configuration option.

Parameters
tdocThe tidy document for which you are setting the filePath.
filePathThe path of the document that should be reported.
int TIDY_CALL tidySetErrorBuffer ( TidyDoc  tdoc,
TidyBuffer *  errbuf 
)

Set error sink to given buffer.

Returns
Returns 0 upon success or a standard error number.
Parameters
tdocThe document to set.
errbufThe TidyBuffer to collect output.
FILE* TIDY_CALL tidySetErrorFile ( TidyDoc  tdoc,
ctmbstr  errfilnam 
)

Set error sink to named file.

Returns
Returns a file handle.
Parameters
tdocThe document to set.
errfilnamThe file path to send output.
int TIDY_CALL tidySetErrorSink ( TidyDoc  tdoc,
TidyOutputSink sink 
)

Set error sink to given generic sink.

Returns
Returns 0 upon success or a standard error number.
Parameters
tdocThe document to set.
sinkThe TidyOutputSink to collect output.
Bool TIDY_CALL tidySetMessageCallback ( TidyDoc  tdoc,
TidyMessageCallback  filtCallback 
)

This function informs Tidy to use the specified callback to send reports.

Parameters
tdocThe tidy document for which the callback applies.
filtCallbackA pointer to your callback function of type TidyMessageCallback.
Bool TIDY_CALL tidySetPrettyPrinterCallback ( TidyDoc  tdoc,
TidyPPProgress  callback 
)

This function informs Tidy to use the specified callback for tracking the pretty-printing process progress.

Bool TIDY_CALL tidySetReportCallback ( TidyDoc  tdoc,
TidyReportCallback  filtCallback 
)

This function informs Tidy to use the specified callback to send reports.

Parameters
tdocThe tidy document for which the callback applies.
filtCallbackA pointer to your callback function of type TidyReportCallback.
Bool TIDY_CALL tidySetReportFilter ( TidyDoc  tdoc,
TidyReportFilter  filtCallback 
)

This function informs Tidy to use the specified callback to send reports.

Parameters
tdocThe tidy document for which the callback applies.
filtCallbackA pointer to your callback function of type TidyReportFilter.
void TIDY_CALL tidyUngetByte ( TidyInputSource source,
uint  byteValue 
)

Helper: unget byte back to input source.

Parameters
sourceThe input source.
byteValueThe byte to push back.