# tidy.h File Reference

Go to the source code of this file.

## Data Structures
struct | _TidyInputSource
struct | _TidyOutputSink
## Defines
#define | EndOfStream (~0u)
## Typedefs
typedef _TidyBuffer | TidyBuffer
typedef int(* | TidyGetByteFunc )(uint sourceData)
typedef void(* | TidyUngetByteFunc )(uint sourceData, byte bt)
typedef Bool(* | TidyEOFFunc )(uint sourceData)
typedef TIDY_STRUCT struct _TidyInputSource | TidyInputSource
typedef void(* | TidyPutByteFunc )(uint sinkData, byte bt)
typedef TIDY_STRUCT struct _TidyOutputSink | TidyOutputSink
typedef Bool(* | TidyReportFilter )(TidyDoc tdoc, TidyReportLevel lvl, uint line, uint col, ctmbstr mssg)
typedef void *(* | TidyMalloc )(size_t len)
typedef void *(* | TidyRealloc )(void *buf, size_t len)
typedef void(* | TidyFree )(void *buf)
typedef void(* | TidyPanic )(ctmbstr mssg)
## Functions
| opaque (TidyDoc)
void | tidyRelease (TidyDoc tdoc)
void | tidySetAppData (TidyDoc tdoc, uint appData)
uint | tidyGetAppData (TidyDoc tdoc)
ctmbstr | tidyReleaseDate ()
int | tidyStatus (TidyDoc tdoc)
int | tidyDetectedHtmlVersion (TidyDoc tdoc)
Bool | tidyDetectedXhtml (TidyDoc tdoc)
Bool | tidyDetectedGenericXml (TidyDoc tdoc)
uint | tidyErrorCount (TidyDoc tdoc)
uint | tidyWarningCount (TidyDoc tdoc)
uint | tidyAccessWarningCount (TidyDoc tdoc)
uint | tidyConfigErrorCount (TidyDoc tdoc)
int | tidyLoadConfig (TidyDoc tdoc, ctmbstr configFile)
int | tidyLoadConfigEnc (TidyDoc tdoc, ctmbstr configFile, ctmbstr charenc)
int | tidySetCharEncoding (TidyDoc tdoc, ctmbstr encnam)
TidyOptionId | tidyOptGetIdForName (ctmbstr optnam)
TidyIterator | tidyGetOptionList (TidyDoc tdoc)
TidyOption | tidyGetNextOption (TidyDoc tdoc, TidyIterator *pos)
TidyOption | tidyGetOption (TidyDoc tdoc, TidyOptionId optId)
TidyOption | tidyGetOptionByName (TidyDoc tdoc, ctmbstr optnam)
TidyOptionId | tidyOptGetId (TidyOption opt)
ctmbstr | tidyOptGetName (TidyOption opt)
TidyOptionType | tidyOptGetType (TidyOption opt)
Bool | tidyOptIsReadOnly (TidyOption opt)
TidyConfigCategory | tidyOptGetCategory (TidyOption opt)
ctmbstr | tidyOptGetDefault (TidyOption opt)
uint | tidyOptGetDefaultInt (TidyOption opt)
Bool | tidyOptGetDefaultBool (TidyOption opt)
TidyIterator | tidyOptGetPickList (TidyOption opt)
ctmbstr | tidyOptGetNextPick (TidyOption opt, TidyIterator *pos)
ctmbstr | tidyOptGetValue (TidyDoc tdoc, TidyOptionId optId)
Bool | tidyOptSetValue (TidyDoc tdoc, TidyOptionId optId, ctmbstr val)
Bool | tidyOptParseValue (TidyDoc tdoc, ctmbstr optnam, ctmbstr val)
uint | tidyOptGetInt (TidyDoc tdoc, TidyOptionId optId)
Bool | tidyOptSetInt (TidyDoc tdoc, TidyOptionId optId, uint val)
Bool | tidyOptGetBool (TidyDoc tdoc, TidyOptionId optId)
Bool | tidyOptSetBool (TidyDoc tdoc, TidyOptionId optId, Bool val)
Bool | tidyOptResetToDefault (TidyDoc tdoc, TidyOptionId opt)
Bool | tidyOptResetAllToDefault (TidyDoc tdoc)
Bool | tidyOptSnapshot (TidyDoc tdoc)
Bool | tidyOptResetToSnapshot (TidyDoc tdoc)
Bool | tidyOptDiffThanDefault (TidyDoc tdoc)
Bool | tidyOptDiffThanSnapshot (TidyDoc tdoc)
Bool | tidyOptCopyConfig (TidyDoc tdocTo, TidyDoc tdocFrom)
ctmbstr | tidyOptGetEncName (TidyDoc tdoc, TidyOptionId optId)
ctmbstr | tidyOptGetCurrPick (TidyDoc tdoc, TidyOptionId optId)
TidyIterator | tidyOptGetDeclTagList (TidyDoc tdoc)
ctmbstr | tidyOptGetNextDeclTag (TidyDoc tdoc, TidyOptionId optId, TidyIterator *iter)
Bool | tidyInitSource (TidyInputSource *source, void *srcData, TidyGetByteFunc gbFunc, TidyUngetByteFunc ugbFunc, TidyEOFFunc endFunc)
uint | tidyGetByte (TidyInputSource *source)
void | tidyUngetByte (TidyInputSource *source, uint byteValue)
Bool | tidyIsEOF (TidyInputSource *source)
Bool | tidyInitSink (TidyOutputSink *sink, void *snkData, TidyPutByteFunc pbFunc)
void | tidyPutByte (TidyOutputSink *sink, uint byteValue)
Bool | tidySetReportFilter (TidyDoc tdoc, TidyReportFilter filtCallback)
FILE * | tidySetErrorFile (TidyDoc tdoc, ctmbstr errfilnam)
int | tidySetErrorBuffer (TidyDoc tdoc, TidyBuffer *errbuf)
int | tidySetErrorSink (TidyDoc tdoc, TidyOutputSink *sink)
Bool | tidySetMallocCall (TidyMalloc fmalloc)
Bool | tidySetReallocCall (TidyRealloc frealloc)
Bool | tidySetFreeCall (TidyFree ffree)
Bool | tidySetPanicCall (TidyPanic fpanic)
int | tidyParseFile (TidyDoc tdoc, ctmbstr filename)
int | tidyParseStdin (TidyDoc tdoc)
int | tidyParseString (TidyDoc tdoc, ctmbstr content)
int | tidyParseBuffer (TidyDoc tdoc, TidyBuffer *buf)
int | tidyParseSource (TidyDoc tdoc, TidyInputSource *source)
int | tidyCleanAndRepair (TidyDoc tdoc)
int | tidyRunDiagnostics (TidyDoc tdoc)
int | tidySaveFile (TidyDoc tdoc, ctmbstr filename)
int | tidySaveStdout (TidyDoc tdoc)
int | tidySaveBuffer (TidyDoc tdoc, TidyBuffer *buf)
int | tidySaveString (TidyDoc tdoc, tmbstr buffer, uint *buflen)
int | tidySaveSink (TidyDoc tdoc, TidyOutputSink *sink)
int | tidyOptSaveFile (TidyDoc tdoc, ctmbstr cfgfil)
int | tidyOptSaveSink (TidyDoc tdoc, TidyOutputSink *sink)
void | tidyErrorSummary (TidyDoc tdoc)
void | tidyGeneralInfo (TidyDoc tdoc)
TidyNode | tidyGetRoot (TidyDoc tdoc)
TidyNode | tidyGetHtml (TidyDoc tdoc)
TidyNode | tidyGetHead (TidyDoc tdoc)
TidyNode | tidyGetBody (TidyDoc tdoc)
TidyNode | tidyGetParent (TidyNode tnod)
TidyNode | tidyGetChild (TidyNode tnod)
TidyNode | tidyGetNext (TidyNode tnod)
TidyNode | tidyGetPrev (TidyNode tnod)
TidyAttr | tidyAttrFirst (TidyNode tnod)
TidyAttr | tidyAttrNext (TidyAttr tattr)
ctmbstr | tidyAttrName (TidyAttr tattr)
ctmbstr | tidyAttrValue (TidyAttr tattr)
TidyNodeType | tidyNodeGetType (TidyNode tnod)
ctmbstr | tidyNodeGetName (TidyNode tnod)
Bool | tidyNodeIsText (TidyNode tnod)
Bool | tidyNodeIsProp (TidyDoc tdoc, TidyNode tnod)
Bool | tidyNodeIsHeader (TidyNode tnod)
Bool | tidyNodeHasText (TidyDoc tdoc, TidyNode tnod)
Bool | tidyNodeGetText (TidyDoc tdoc, TidyNode tnod, TidyBuffer *buf)
TidyTagId | tidyNodeGetId (TidyNode tnod)
Bool | tidyNodeIsHTML (TidyNode tnod)
Bool | tidyNodeIsHEAD (TidyNode tnod)
Bool | tidyNodeIsTITLE (TidyNode tnod)
Bool | tidyNodeIsBASE (TidyNode tnod)
Bool | tidyNodeIsMETA (TidyNode tnod)
Bool | tidyNodeIsBODY (TidyNode tnod)
Bool | tidyNodeIsFRAMESET (TidyNode tnod)
Bool | tidyNodeIsFRAME (TidyNode tnod)
Bool | tidyNodeIsIFRAME (TidyNode tnod)
Bool | tidyNodeIsNOFRAMES (TidyNode tnod)
Bool | tidyNodeIsHR (TidyNode tnod)
Bool | tidyNodeIsH1 (TidyNode tnod)
Bool | tidyNodeIsH2 (TidyNode tnod)
Bool | tidyNodeIsPRE (TidyNode tnod)
Bool | tidyNodeIsLISTING (TidyNode tnod)
Bool | tidyNodeIsP (TidyNode tnod)
Bool | tidyNodeIsUL (TidyNode tnod)
Bool | tidyNodeIsOL (TidyNode tnod)
Bool | tidyNodeIsDL (TidyNode tnod)
Bool | tidyNodeIsDIR (TidyNode tnod)
Bool | tidyNodeIsLI (TidyNode tnod)
Bool | tidyNodeIsDT (TidyNode tnod)
Bool | tidyNodeIsDD (TidyNode tnod)
Bool | tidyNodeIsTABLE (TidyNode tnod)
Bool | tidyNodeIsCAPTION (TidyNode tnod)
Bool | tidyNodeIsTD (TidyNode tnod)
Bool | tidyNodeIsTH (TidyNode tnod)
Bool | tidyNodeIsTR (TidyNode tnod)
Bool | tidyNodeIsCOL (TidyNode tnod)
Bool | tidyNodeIsCOLGROUP (TidyNode tnod)
Bool | tidyNodeIsBR (TidyNode tnod)
Bool | tidyNodeIsA (TidyNode tnod)
Bool | tidyNodeIsLINK (TidyNode tnod)
Bool | tidyNodeIsB (TidyNode tnod)
Bool | tidyNodeIsI (TidyNode tnod)
Bool | tidyNodeIsSTRONG (TidyNode tnod)
Bool | tidyNodeIsEM (TidyNode tnod)
Bool | tidyNodeIsBIG (TidyNode tnod)
Bool | tidyNodeIsSMALL (TidyNode tnod)
Bool | tidyNodeIsPARAM (TidyNode tnod)
Bool | tidyNodeIsOPTION (TidyNode tnod)
Bool | tidyNodeIsOPTGROUP (TidyNode tnod)
Bool | tidyNodeIsIMG (TidyNode tnod)
Bool | tidyNodeIsMAP (TidyNode tnod)
Bool | tidyNodeIsAREA (TidyNode tnod)
Bool | tidyNodeIsNOBR (TidyNode tnod)
Bool | tidyNodeIsWBR (TidyNode tnod)
Bool | tidyNodeIsFONT (TidyNode tnod)
Bool | tidyNodeIsLAYER (TidyNode tnod)
Bool | tidyNodeIsSPACER (TidyNode tnod)
Bool | tidyNodeIsCENTER (TidyNode tnod)
Bool | tidyNodeIsSTYLE (TidyNode tnod)
Bool | tidyNodeIsSCRIPT (TidyNode tnod)
Bool | tidyNodeIsNOSCRIPT (TidyNode tnod)
Bool | tidyNodeIsFORM (TidyNode tnod)
Bool | tidyNodeIsTEXTAREA (TidyNode tnod)
Bool | tidyNodeIsBLOCKQUOTE (TidyNode tnod)
Bool | tidyNodeIsAPPLET (TidyNode tnod)
Bool | tidyNodeIsOBJECT (TidyNode tnod)
Bool | tidyNodeIsDIV (TidyNode tnod)
Bool | tidyNodeIsSPAN (TidyNode tnod)
Bool | tidyNodeIsINPUT (TidyNode tnod)
Bool | tidyNodeIsQ (TidyNode tnod)
Bool | tidyNodeIsLABEL (TidyNode tnod)
Bool | tidyNodeIsH3 (TidyNode tnod)
Bool | tidyNodeIsH4 (TidyNode tnod)
Bool | tidyNodeIsH5 (TidyNode tnod)
Bool | tidyNodeIsH6 (TidyNode tnod)
Bool | tidyNodeIsADDRESS (TidyNode tnod)
Bool | tidyNodeIsXMP (TidyNode tnod)
Bool | tidyNodeIsSELECT (TidyNode tnod)
Bool | tidyNodeIsBLINK (TidyNode tnod)
Bool | tidyNodeIsMARQUEE (TidyNode tnod)
Bool | tidyNodeIsEMBED (TidyNode tnod)
Bool | tidyNodeIsBASEFONT (TidyNode tnod)
Bool | tidyNodeIsISINDEX (TidyNode tnod)
Bool | tidyNodeIsS (TidyNode tnod)
Bool | tidyNodeIsSTRIKE (TidyNode tnod)
Bool | tidyNodeIsU (TidyNode tnod)
Bool | tidyNodeIsMENU (TidyNode tnod)
TidyAttrId | tidyAttrGetId (TidyAttr tattr)
Bool | tidyAttrIsEvent (TidyAttr tattr)
Bool | tidyAttrIsProp (TidyAttr tattr)
Bool | tidyAttrIsHREF (TidyAttr tattr)
Bool | tidyAttrIsSRC (TidyAttr tattr)
Bool | tidyAttrIsID (TidyAttr tattr)
Bool | tidyAttrIsNAME (TidyAttr tattr)
Bool | tidyAttrIsSUMMARY (TidyAttr tattr)
Bool | tidyAttrIsALT (TidyAttr tattr)
Bool | tidyAttrIsLONGDESC (TidyAttr tattr)
Bool | tidyAttrIsUSEMAP (TidyAttr tattr)
Bool | tidyAttrIsISMAP (TidyAttr tattr)
Bool | tidyAttrIsLANGUAGE (TidyAttr tattr)
Bool | tidyAttrIsTYPE (TidyAttr tattr)
Bool | tidyAttrIsVALUE (TidyAttr tattr)
Bool | tidyAttrIsCONTENT (TidyAttr tattr)
Bool | tidyAttrIsTITLE (TidyAttr tattr)
Bool | tidyAttrIsXMLNS (TidyAttr tattr)
Bool | tidyAttrIsDATAFLD (TidyAttr tattr)
Bool | tidyAttrIsWIDTH (TidyAttr tattr)
Bool | tidyAttrIsHEIGHT (TidyAttr tattr)
Bool | tidyAttrIsFOR (TidyAttr tattr)
Bool | tidyAttrIsSELECTED (TidyAttr tattr)
Bool | tidyAttrIsCHECKED (TidyAttr tattr)
Bool | tidyAttrIsLANG (TidyAttr tattr)
Bool | tidyAttrIsTARGET (TidyAttr tattr)
Bool | tidyAttrIsHTTP_EQUIV (TidyAttr tattr)
Bool | tidyAttrIsREL (TidyAttr tattr)
Bool | tidyAttrIsOnMOUSEMOVE (TidyAttr tattr)
Bool | tidyAttrIsOnMOUSEDOWN (TidyAttr tattr)
Bool | tidyAttrIsOnMOUSEUP (TidyAttr tattr)
Bool | tidyAttrIsOnCLICK (TidyAttr tattr)
Bool | tidyAttrIsOnMOUSEOVER (TidyAttr tattr)
Bool | tidyAttrIsOnMOUSEOUT (TidyAttr tattr)
Bool | tidyAttrIsOnKEYDOWN (TidyAttr tattr)
Bool | tidyAttrIsOnKEYUP (TidyAttr tattr)
Bool | tidyAttrIsOnKEYPRESS (TidyAttr tattr)
Bool | tidyAttrIsOnFOCUS (TidyAttr tattr)
Bool | tidyAttrIsOnBLUR (TidyAttr tattr)
Bool | tidyAttrIsBGCOLOR (TidyAttr tattr)
Bool | tidyAttrIsLINK (TidyAttr tattr)
Bool | tidyAttrIsALINK (TidyAttr tattr)
Bool | tidyAttrIsVLINK (TidyAttr tattr)
Bool | tidyAttrIsTEXT (TidyAttr tattr)
Bool | tidyAttrIsSTYLE (TidyAttr tattr)
Bool | tidyAttrIsABBR (TidyAttr tattr)
Bool | tidyAttrIsCOLSPAN (TidyAttr tattr)
Bool | tidyAttrIsROWSPAN (TidyAttr tattr)
TidyAttr | tidyAttrGetHREF (TidyNode tnod)
TidyAttr | tidyAttrGetSRC (TidyNode tnod)
TidyAttr | tidyAttrGetID (TidyNode tnod)
TidyAttr | tidyAttrGetNAME (TidyNode tnod)
TidyAttr | tidyAttrGetSUMMARY (TidyNode tnod)
TidyAttr | tidyAttrGetALT (TidyNode tnod)
TidyAttr | tidyAttrGetLONGDESC (TidyNode tnod)
TidyAttr | tidyAttrGetUSEMAP (TidyNode tnod)
TidyAttr | tidyAttrGetISMAP (TidyNode tnod)
TidyAttr | tidyAttrGetLANGUAGE (TidyNode tnod)
TidyAttr | tidyAttrGetTYPE (TidyNode tnod)
TidyAttr | tidyAttrGetVALUE (TidyNode tnod)
TidyAttr | tidyAttrGetCONTENT (TidyNode tnod)
TidyAttr | tidyAttrGetTITLE (TidyNode tnod)
TidyAttr | tidyAttrGetXMLNS (TidyNode tnod)
TidyAttr | tidyAttrGetDATAFLD (TidyNode tnod)
TidyAttr | tidyAttrGetWIDTH (TidyNode tnod)
TidyAttr | tidyAttrGetHEIGHT (TidyNode tnod)
TidyAttr | tidyAttrGetFOR (TidyNode tnod)
TidyAttr | tidyAttrGetSELECTED (TidyNode tnod)
TidyAttr | tidyAttrGetCHECKED (TidyNode tnod)
TidyAttr | tidyAttrGetLANG (TidyNode tnod)
TidyAttr | tidyAttrGetTARGET (TidyNode tnod)
TidyAttr | tidyAttrGetHTTP_EQUIV (TidyNode tnod)
TidyAttr | tidyAttrGetREL (TidyNode tnod)
TidyAttr | tidyAttrGetOnMOUSEMOVE (TidyNode tnod)
TidyAttr | tidyAttrGetOnMOUSEDOWN (TidyNode tnod)
TidyAttr | tidyAttrGetOnMOUSEUP (TidyNode tnod)
TidyAttr | tidyAttrGetOnCLICK (TidyNode tnod)
TidyAttr | tidyAttrGetOnMOUSEOVER (TidyNode tnod)
TidyAttr | tidyAttrGetOnMOUSEOUT (TidyNode tnod)
TidyAttr | tidyAttrGetOnKEYDOWN (TidyNode tnod)
TidyAttr | tidyAttrGetOnKEYUP (TidyNode tnod)
TidyAttr | tidyAttrGetOnKEYPRESS (TidyNode tnod)
TidyAttr | tidyAttrGetOnFOCUS (TidyNode tnod)
TidyAttr | tidyAttrGetOnBLUR (TidyNode tnod)
TidyAttr | tidyAttrGetBGCOLOR (TidyNode tnod)
TidyAttr | tidyAttrGetLINK (TidyNode tnod)
TidyAttr | tidyAttrGetALINK (TidyNode tnod)
TidyAttr | tidyAttrGetVLINK (TidyNode tnod)
TidyAttr | tidyAttrGetTEXT (TidyNode tnod)
TidyAttr | tidyAttrGetSTYLE (TidyNode tnod)
TidyAttr | tidyAttrGetABBR (TidyNode tnod)
TidyAttr | tidyAttrGetCOLSPAN (TidyNode tnod)
TidyAttr | tidyAttrGetROWSPAN (TidyNode tnod)
## Variables
TIDY_STRUCT struct | _TidyBuffer
TidyDoc | tidyCreate ()

## Detailed Description

- Defines HTML Tidy API implemented by tidy library.

Public interface is const-correct and doesn't explicitly depend on any globals. Thus, thread-safety may be introduced w/out changing the interface.

Looking ahead to a C++ wrapper, C functions always pass this-equivalent as 1st arg.

Copyright (c) 1998-2002 World Wide Web Consortium (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.

CVS Info :

Author:
  creitzel

Date:
  2002/10/15 19:46:52

Revision:
  1.1.2.10

Contributing Author(s):

Dave Raggett <dsr@w3.org>

The contributing author(s) would like to thank all those who helped with testing, bug fixes and suggestions for improvements. This wouldn't have been possible without your help.

COPYRIGHT NOTICE:

This software and documentation is provided "as is," and the copyright holders and contributing author(s) make no representations or warranties, express or implied, including but not limited to, warranties of merchantability or fitness for any particular purpose or that the use of the software or documentation will not infringe any third party patents, copyrights, trademarks or other rights.

The copyright holders and contributing author(s) will not be held liable for any direct, indirect, special or consequential damages arising out of any use of the software or documentation, even if advised of the possibility of such damage.

Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, documentation and executables, for any purpose, without fee, subject to the following restrictions:

1. The origin of this source code must not be misrepresented. 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. 3. This Copyright notice may not be removed or altered from any source or altered source distribution.

The copyright holders and contributing author(s) specifically permit, without fee, and encourage the use of this source code as a component for supporting the Hypertext Markup Language in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated.

Created 2001-05-20 by Charles Reitzel Updated 2002-07-01 by Charles Reitzel - 1st Implementation