~ubuntu-branches/ubuntu/vivid/tidy/vivid

« back to all changes in this revision

Viewing changes to src/pprint.h

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (0.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080120214603-oqicq5jwr1exrm55
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
/* pprint.h -- pretty print parse tree  
5
5
  
6
 
   (c) 1998-2003 (W3C) MIT, ERCIM, Keio University
 
6
   (c) 1998-2007 (W3C) MIT, ERCIM, Keio University
7
7
   See tidy.h for the copyright notice.
8
8
  
9
9
   CVS Info:
10
 
     $Author: hoehrmann $ 
11
 
     $Date: 2003/05/24 15:55:02 $ 
12
 
     $Revision: 1.4 $ 
 
10
     $Author: arnaud02 $ 
 
11
     $Date: 2007/02/11 09:45:08 $ 
 
12
     $Revision: 1.9 $ 
13
13
 
14
14
*/
15
15
 
26
26
  start tags and before end tags
27
27
*/
28
28
 
29
 
#define NORMAL        0
30
 
#define PREFORMATTED  1
31
 
#define COMMENT       2
32
 
#define ATTRIBVALUE   4
33
 
#define NOWRAP        8
34
 
#define CDATA         16
 
29
#define NORMAL        0u
 
30
#define PREFORMATTED  1u
 
31
#define COMMENT       2u
 
32
#define ATTRIBVALUE   4u
 
33
#define NOWRAP        8u
 
34
#define CDATA         16u
35
35
 
36
36
 
37
37
/* The pretty printer keeps at most two lines of text in the
52
52
 
53
53
typedef struct _TidyPrintImpl
54
54
{
 
55
    TidyAllocator *allocator; /* Allocator */
 
56
 
55
57
    uint *linebuf;
56
58
    uint lbufsize;
57
59
    uint linelen;
58
60
    uint wraphere;
59
 
    uint linecount;
60
61
  
61
62
    uint ixInd;
62
63
    TidyIndent indent[2];  /* Two lines worth of indent state */
63
 
 
64
64
} TidyPrintImpl;
65
65
 
66
 
void PPrintDocument( TidyDocImpl* doc );
67
 
 
68
 
 
69
 
#if SUPPORT_ASIAN_ENCODINGS
 
66
 
 
67
#if 0 && SUPPORT_ASIAN_ENCODINGS
70
68
/* #431953 - start RJ Wraplen adjusted for smooth international ride */
71
69
uint CWrapLen( TidyDocImpl* doc, uint ind );
72
70
#endif
73
71
 
74
 
void InitPrintBuf( TidyDocImpl* doc );
75
 
void FreePrintBuf( TidyDocImpl* doc );
76
 
 
77
 
void PFlushLine( TidyDocImpl* doc, uint indent );
78
 
void PCondFlushLine( TidyDocImpl* doc, uint indent );
79
 
 
80
 
void PPrintScriptStyle( TidyDocImpl* doc, uint mode, uint indent, Node* node );
 
72
void TY_(InitPrintBuf)( TidyDocImpl* doc );
 
73
void TY_(FreePrintBuf)( TidyDocImpl* doc );
 
74
 
 
75
void TY_(PFlushLine)( TidyDocImpl* doc, uint indent );
 
76
 
81
77
 
82
78
/* print just the content of the body element.
83
79
** useful when you want to reuse material from
86
82
** -- Sebastiano Vigna <vigna@dsi.unimi.it>
87
83
*/
88
84
 
89
 
void PrintPreamble( TidyDocImpl* doc );   /* Between these 3, */
90
 
void PrintBody( TidyDocImpl* doc );       /* you can print an entire document */
91
 
void PrintPostamble( TidyDocImpl* doc );  /* or you can substitute another */
 
85
void TY_(PrintBody)( TidyDocImpl* doc );       /* you can print an entire document */
92
86
                                          /* node as body using PPrintTree() */
93
87
 
94
 
void PPrintTree( TidyDocImpl* doc, uint mode, uint indent, Node *node );
 
88
void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node );
95
89
 
96
 
void PPrintXMLTree( TidyDocImpl* doc, uint mode, uint indent, Node *node );
 
90
void TY_(PPrintXMLTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node );
97
91
 
98
92
 
99
93
#endif /* __PPRINT_H__ */