summaryrefslogtreecommitdiff
blob: 926f57b9caf61aaaa475d549696f3198b9631621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
--- html2b-unpatched/html2db/main.c	2003-03-11 04:28:46.000000000 +0800
+++ html2db/main.c	2003-11-08 12:32:41.000000000 +0800
@@ -75,8 +75,8 @@
         doc = tidyDocToImpl( tdoc );
         out = FileOutput(stdout, 0, '\n');
         doc->docOut = out;
-        PrintSgml( doc, 0, 0, doc->root );
-        doc->docOut = null;
+        PrintSgml( doc, 0, 0, &( doc->root ) );
+        doc->docOut = NULL;
     }
     else {
         fprintf(stderr, "Problem parsing file %s\n", file); 
--- html2b-unpatched/html2db/pprint.c	2003-05-05 22:23:30.000000000 +0800
+++ html2db/pprint.c	2003-11-08 12:34:42.000000000 +0800
@@ -341,7 +341,7 @@
     Node *parent;
     
     for (parent = element->parent;
-            parent != null; parent = parent->parent)
+            parent != NULL; parent = parent->parent)
     {   if (parent->element && tmbstrcasecmp(parent->element, "address") == 0)
             return yes;
     }
@@ -488,7 +488,7 @@
     Bool xhtml = cfgBool( doc, TidyXhtmlOut);
     uint spaces = cfg( doc, TidyIndentSpaces );
 
-    if (node == null)
+    if (node == NULL)
         return;
     
     if (node->type == TextNode) {
@@ -521,7 +521,7 @@
     else if (node->type == RootNode)
     {
         for (content = node->content;
-                content != null;
+                content != NULL;
                 content = content->next)
            PrintSgml(doc, mode, indent, content);
     }
@@ -565,7 +565,7 @@
             PFlushLine(doc, indent);
 
             for (content = node->content;
-                    content != null;
+                    content != NULL;
                     content = content->next)
                 PrintSgml(doc, (mode | PREFORMATTED | NOWRAP), 
                             indent, content);
@@ -574,7 +574,7 @@
             PrintSgmlTag(doc, mode, indent, node, SgmlTagEnd);
             PFlushLine(doc, indent);
 
-            if ( !cfg(doc, TidyIndentContent) && node->next != null )
+            if ( !cfg(doc, TidyIndentContent) && node->next != NULL )
                 PFlushLine(doc, indent);
         }
         else if (node->tag->model & CM_INLINE)
@@ -586,7 +586,7 @@
                 indent += spaces;
 
                 for (content = node->content;
-                        content != null;
+                        content != NULL;
                         content = content->next)
                     PrintSgml(doc, mode, indent, content);
 
@@ -598,7 +598,7 @@
             {
 
                 for (content = node->content;
-                        content != null;
+                        content != NULL;
                         content = content->next)
                     PrintSgml(doc, mode, indent, content);
             }
@@ -607,7 +607,7 @@
         }
         else 
         {   PCondFlushLine(doc, indent);
-/*            if (TidySmartIndent && node->prev != null)
+/*            if (TidySmartIndent && node->prev != NULL)
                 PFlushLine(doc, indent);
 */
             PrintSgmlTag(doc, mode ,indent, node, SgmlTagStart);
@@ -623,7 +623,7 @@
                 indent += spaces;
 
                 for (content = node->content;
-                        content != null;
+                        content != NULL;
                         content = content->next)
                     PrintSgml(doc, mode, indent, content);
                 PCondFlushLine(doc, indent);
@@ -632,9 +632,9 @@
             }
             else
             {   Node *last;
-                last = null;
+                last = NULL;
                 for (content = node->content;
-                        content != null;
+                        content != NULL;
                         content = content->next) {
                     /* kludge for naked text before block level tag */
                     if (last && !cfg(doc, TidyIndentContent) && 
@@ -654,7 +654,7 @@
             PrintSgmlTag(doc, mode, indent, node, SgmlTagEnd);
             PFlushLine(doc, indent);
             if (cfg(doc, TidyIndentContent) == no &&
-                node->next != null &&
+                node->next != NULL &&
                 TidyHideEndTags == no &&
                 (node->tag->model & (CM_BLOCK|CM_LIST|CM_DEFLIST|CM_TABLE)))
                 PFlushLine(doc, indent);