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

By default, Tidy will define, create and use instances of input and output handlers for standard C buffered I/O (i.e. More...

Data Structures

struct  _TidyInputSource
 TidyInputSource - Delivers raw bytes of input. More...
 
struct  _TidyOutputSink
 TidyOutputSink - accepts raw bytes of output. More...
 

Macros

#define EndOfStream   (~0u)
 End of input "character". More...
 

Typedefs

typedef Bool(TIDY_CALL * TidyEOFFunc) (void *sourceData)
 Input Callback: is end of input? More...
 
typedef int(TIDY_CALL * TidyGetByteFunc) (void *sourceData)
 Input Callback: get next byte of input. More...
 
typedef TIDY_STRUCT struct _TidyInputSource TidyInputSource
 TidyInputSource - Delivers raw bytes of input. More...
 
typedef TIDY_STRUCT struct _TidyOutputSink TidyOutputSink
 TidyOutputSink - accepts raw bytes of output. More...
 
typedef void(TIDY_CALL * TidyPutByteFunc) (void *sinkData, byte bt)
 Output callback: send a byte to output. More...
 
typedef Bool(TIDY_CALL * TidyReportFilter) (TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr mssg)
 Callback to filter messages by diagnostic level: info, warning, etc. More...
 
typedef Bool(TIDY_CALL * TidyReportFilter2) (TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr mssg, va_list args)
 
typedef void(TIDY_CALL * TidyUngetByteFunc) (void *sourceData, byte bt)
 Input Callback: unget a byte of input. More...
 

Functions

uint TIDY_CALL tidyGetByte (TidyInputSource *source)
 Helper: get next byte from input source. 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...
 
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...
 
Bool TIDY_CALL tidyIsEOF (TidyInputSource *source)
 Helper: check if input source at end. More...
 
void TIDY_CALL tidyPutByte (TidyOutputSink *sink, uint byteValue)
 Helper: send a byte to output. More...
 
int TIDY_CALL tidySetErrorBuffer (TidyDoc tdoc, TidyBuffer *errbuf)
 Set error sink to given buffer. More...
 
FILE *TIDY_CALL tidySetErrorFile (TidyDoc tdoc, ctmbstr errfilnam)
 Set error sink to named file. More...
 
int TIDY_CALL tidySetErrorSink (TidyDoc tdoc, TidyOutputSink *sink)
 Set error sink to given generic sink. More...
 
Bool TIDY_CALL tidySetReportFilter (TidyDoc tdoc, TidyReportFilter filtCallback)
 Give Tidy a filter callback to use. More...
 
Bool TIDY_CALL tidySetReportFilter2 (TidyDoc tdoc, TidyReportFilter2 filtCallback)
 
void TIDY_CALL tidyUngetByte (TidyInputSource *source, uint byteValue)
 Helper: unget byte back to input source. More...
 

Detailed Description

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 Structure Documentation

struct _TidyInputSource

Definition at line 559 of file tidy.h.

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

Definition at line 600 of file tidy.h.

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

Passed to callbacks

Macro Definition Documentation

#define EndOfStream   (~0u)

Definition at line 554 of file tidy.h.

Typedef Documentation

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

Definition at line 551 of file tidy.h.

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

Definition at line 545 of file tidy.h.

typedef TIDY_STRUCT struct _TidyInputSource TidyInputSource
typedef TIDY_STRUCT struct _TidyOutputSink TidyOutputSink
typedef void(TIDY_CALL * TidyPutByteFunc) (void *sinkData, byte bt)

Definition at line 594 of file tidy.h.

typedef Bool(TIDY_CALL * TidyReportFilter) (TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr mssg)

Just set diagnostic output handler to redirect all diagnostics output. Return true to proceed with output, false to cancel.

Definition at line 626 of file tidy.h.

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

Definition at line 629 of file tidy.h.

typedef void(TIDY_CALL * TidyUngetByteFunc) (void *sourceData, byte bt)

Definition at line 548 of file tidy.h.

Function Documentation

uint TIDY_CALL tidyGetByte ( TidyInputSource source)
Bool TIDY_CALL tidyInitSink ( TidyOutputSink sink,
void *  snkData,
TidyPutByteFunc  pbFunc 
)

Needed by .NET and possibly other language bindings.

Bool TIDY_CALL tidyInitSource ( TidyInputSource source,
void *  srcData,
TidyGetByteFunc  gbFunc,
TidyUngetByteFunc  ugbFunc,
TidyEOFFunc  endFunc 
)

Needed by .NET and possibly other language bindings.

Bool TIDY_CALL tidyIsEOF ( TidyInputSource source)
void TIDY_CALL tidyPutByte ( TidyOutputSink sink,
uint  byteValue 
)
int TIDY_CALL tidySetErrorBuffer ( TidyDoc  tdoc,
TidyBuffer errbuf 
)
FILE* TIDY_CALL tidySetErrorFile ( TidyDoc  tdoc,
ctmbstr  errfilnam 
)
int TIDY_CALL tidySetErrorSink ( TidyDoc  tdoc,
TidyOutputSink sink 
)
Bool TIDY_CALL tidySetReportFilter ( TidyDoc  tdoc,
TidyReportFilter  filtCallback 
)
Bool TIDY_CALL tidySetReportFilter2 ( TidyDoc  tdoc,
TidyReportFilter2  filtCallback 
)
void TIDY_CALL tidyUngetByte ( TidyInputSource source,
uint  byteValue 
)