107 #define CM_EMPTY (1 << 0) 109 #define CM_HTML (1 << 1) 111 #define CM_HEAD (1 << 2) 113 #define CM_BLOCK (1 << 3) 115 #define CM_INLINE (1 << 4) 117 #define CM_LIST (1 << 5) 119 #define CM_DEFLIST (1 << 6) 121 #define CM_TABLE (1 << 7) 123 #define CM_ROWGRP (1 << 8) 125 #define CM_ROW (1 << 9) 128 #define CM_FIELD (1 << 10) 131 #define CM_OBJECT (1 << 11) 133 #define CM_PARAM (1 << 12) 135 #define CM_FRAMES (1 << 13) 137 #define CM_HEADING (1 << 14) 139 #define CM_OPT (1 << 15) 141 #define CM_IMG (1 << 16) 143 #define CM_MIXED (1 << 17) 146 #define CM_NO_INDENT (1 << 18) 148 #define CM_OBSOLETE (1 << 19) 151 #define CM_NEW (1 << 20) 153 #define CM_OMITST (1 << 21) 182 #define VERS_SUN 8192u 183 #define VERS_NETSCAPE 16384u 184 #define VERS_MICROSOFT 32768u 187 #define VERS_XML 65536u 194 #define VERS_UNKNOWN (xxxx) 195 #define VERS_HTML20 (HT20) 196 #define VERS_HTML32 (HT32) 197 #define VERS_HTML40_STRICT (H40S|H41S|X10S) 198 #define VERS_HTML40_LOOSE (H40T|H41T|X10T) 199 #define VERS_FRAMESET (H40F|H41F|X10F) 200 #define VERS_XHTML11 (XH11) 201 #define VERS_BASIC (XB10) 203 #define VERS_HTML5 (HT50|XH50) 206 #define VERS_HTML40 (VERS_HTML40_STRICT|VERS_HTML40_LOOSE|VERS_FRAMESET) 207 #define VERS_IFRAME (VERS_HTML40_LOOSE|VERS_FRAMESET) 208 #define VERS_LOOSE (VERS_HTML20|VERS_HTML32|VERS_IFRAME) 209 #define VERS_EVENTS (VERS_HTML40|VERS_XHTML11) 210 #define VERS_FROM32 (VERS_HTML32|VERS_HTML40) 211 #define VERS_FROM40 (VERS_HTML40|VERS_XHTML11|VERS_BASIC) 212 #define VERS_XHTML (X10S|X10T|X10F|XH11|XB10|XH50) 215 #define VERS_STRICT (VERS_HTML5|VERS_HTML40_STRICT) 218 #define VERS_ALL (VERS_HTML20|VERS_HTML32|VERS_FROM40|XH50|HT50) 221 #define VERS_PROPRIETARY (VERS_NETSCAPE|VERS_MICROSOFT|VERS_SUN) 226 typedef struct _Style TagStyle;
321 #ifdef TIDY_STORE_ORIGINAL_TEXT 406 int TY_(HTMLVersion)( TidyDocImpl* doc );
411 void TY_(ConstrainVersion)( TidyDocImpl* doc,
uint vers );
427 Lexer*
TY_(NewLexer)( TidyDocImpl* doc );
428 void TY_(FreeLexer)( TidyDocImpl* doc );
431 void TY_(AddCharToLexer)( Lexer *lexer,
uint c );
446 Node*
TY_(NewNode)( TidyAllocator* allocator, Lexer* lexer );
450 Node*
TY_(CloneNode)( TidyDocImpl* doc, Node *element );
453 void TY_(FreeAttrs)( TidyDocImpl* doc, Node *node );
456 void TY_(FreeAttribute)( TidyDocImpl* doc, AttVal *av );
459 void TY_(DetachAttribute)( Node *node, AttVal *attr );
463 void TY_(RemoveAttribute)( TidyDocImpl* doc, Node *node, AttVal *attr );
470 void TY_(FreeNode)( TidyDocImpl* doc, Node *node );
472 Node*
TY_(TextToken)( Lexer *lexer );
475 Node*
TY_(NewLineNode)( Lexer *lexer );
478 Node*
TY_(NewLiteralTextNode)(Lexer *lexer,
ctmbstr txt );
480 void TY_(AddStringLiteral)( Lexer* lexer,
ctmbstr str );
484 Node*
TY_(FindDocType)( TidyDocImpl* doc );
485 Node*
TY_(FindHTML)( TidyDocImpl* doc );
486 Node*
TY_(FindHEAD)( TidyDocImpl* doc );
487 Node*
TY_(FindTITLE)(TidyDocImpl* doc);
488 Node*
TY_(FindBody)( TidyDocImpl* doc );
489 Node*
TY_(FindXmlDecl)(TidyDocImpl* doc);
492 Node*
TY_(FindContainer)( Node* node );
495 Bool TY_(AddGenerator)( TidyDocImpl* doc );
497 uint TY_(ApparentVersion)( TidyDocImpl* doc );
501 Bool TY_(WarnMissingSIInEmittedDocType)( TidyDocImpl* doc );
503 Bool TY_(SetXHTMLDocType)( TidyDocImpl* doc );
507 Bool TY_(FixDocType)( TidyDocImpl* doc );
511 Bool TY_(FixXmlDecl)( TidyDocImpl* doc );
515 void TY_(UngetToken)( TidyDocImpl* doc );
537 void TY_(InitMap)(void);
541 AttVal*
TY_(NewAttribute)( TidyDocImpl* doc );
548 void TY_(InsertAttributeAtEnd)( Node *node, AttVal *av );
551 void TY_(InsertAttributeAtStart)( Node *node, AttVal *av );
559 AttVal*
TY_(DupAttrs)( TidyDocImpl* doc, AttVal* attrs );
577 void TY_(PushInline)( TidyDocImpl* doc, Node* node );
580 void TY_(PopInline)( TidyDocImpl* doc, Node* node );
582 Bool TY_(IsPushed)( TidyDocImpl* doc, Node* node );
583 Bool TY_(IsPushedLast)( TidyDocImpl* doc, Node *element, Node *node );
602 int TY_(InlineDup)( TidyDocImpl* doc, Node *node );
608 void TY_(DeferDup)( TidyDocImpl* doc );
609 Node*
TY_(InsertedToken)( TidyDocImpl* doc );
612 Bool TY_(SwitchInline)( TidyDocImpl* doc, Node* element, Node* node );
613 Bool TY_(InlineDup1)( TidyDocImpl* doc, Node* node, Node* element );
uint lexlength
Definition: lexer.h:381
uint doctype
Definition: lexer.h:356
uint end
Definition: lexer.h:311
uint lines
Definition: lexer.h:347
Bool closed
Definition: lexer.h:317
Bool seenEndBody
Definition: lexer.h:368
uint txtend
Definition: lexer.h:360
Node * next
Definition: lexer.h:300
Bool linebreak
Definition: lexer.h:319
tmbstr attribute
Definition: lexer.h:262
TidyAllocator * allocator
Definition: lexer.h:394
tmbstr tag
Definition: lexer.h:230
AttVal * attributes
Definition: lexer.h:288
tmbstr properties
Definition: lexer.h:232
NodeType
Definition: lexer.h:52
LexerState state
Definition: lexer.h:361
TidyTagId
Known HTML element types.
Definition: tidyenum.h:311
int delim
Definition: lexer.h:261
StyleProp * next
Definition: lexer.h:246
AttVal * next
Definition: lexer.h:257
uint column
Definition: lexer.h:315
ParseDocTypeDeclState
Definition: lexer.h:92
Bool pushed
Definition: lexer.h:350
const Dict * was
Definition: lexer.h:305
NodeType type
Definition: lexer.h:312
uint line
Definition: lexer.h:314
tmbstr lexbuf
Definition: lexer.h:380
Node * parent
Definition: lexer.h:298
Node * content
Definition: lexer.h:301
tmbstr tag_class
Definition: lexer.h:231
uint start
Definition: lexer.h:310
Bool seenEndHtml
Definition: lexer.h:369
Bool bad_doctype
Definition: lexer.h:358
Node * token
Definition: lexer.h:363
uint istackbase
Definition: lexer.h:390
Node * inode
Definition: lexer.h:385
uint lexsize
Definition: lexer.h:382
uint versions
Definition: lexer.h:355
Bool isvoyager
Definition: lexer.h:354
Bool implicit
Definition: lexer.h:318
IStack * insert
Definition: lexer.h:386
Bool exiled
Definition: lexer.h:353
uint istacklength
Definition: lexer.h:388
const Dict * tag
Definition: lexer.h:286
TagStyle * next
Definition: lexer.h:233
static FILE * errout
Definition: tidy.c:25
uint txtstart
Definition: lexer.h:359
Node * prev
Definition: lexer.h:299
LexerState
Definition: lexer.h:74
uint columns
Definition: lexer.h:348
uint versionEmitted
Definition: lexer.h:357
IStack * next
Definition: lexer.h:285
tmbstr name
Definition: lexer.h:244
Node * root
Definition: lexer.h:365
Node * asp
Definition: lexer.h:259
uint istacksize
Definition: lexer.h:389
TagStyle * styles
Definition: lexer.h:392
const Attribute * dict
Definition: lexer.h:258
tmbstr value
Definition: lexer.h:245
#define TY_(str)
Definition: forward.h:23
Bool insertspace
Definition: lexer.h:351
Bool waswhite
Definition: lexer.h:349
IStack * istack
Definition: lexer.h:387
Node * last
Definition: lexer.h:302
tmbstr element
Definition: lexer.h:287
Node * php
Definition: lexer.h:260
GetTokenMode
Definition: lexer.h:525
Node * itoken
Definition: lexer.h:364
Bool excludeBlocks
Definition: lexer.h:352