summaryrefslogtreecommitdiff
path: root/www/tidy-devel/files/patch-ac
blob: 957ffed0d9814f7e8b1f56f5d8ad2702a258f27c (plain) (blame)
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
--- config.c.orig	Fri Aug  4 19:21:05 2000
+++ config.c	Mon Nov 19 14:42:14 2001
@@ -94,6 +94,7 @@
 Bool TidyMark = yes;        /* add meta element indicating tidied doc */
 Bool Emacs = no;            /* if true format error output for GNU Emacs */
 Bool LiteralAttribs = no;   /* if true attributes may use newlines */
+Bool PreserveEntities = no; /* if true don't convert entities to chars */
 
 typedef struct _lex PLex;
 
@@ -186,6 +187,7 @@
     {"doctype",         {(int *)&doctype_str},      ParseDocType},
     {"fix-backslash",   {(int *)&FixBackslash},     ParseBool},
     {"gnu-emacs",       {(int *)&Emacs},            ParseBool},
+    {"preserve-entities", {(int *)&PreserveEntities}, ParseBool},
 
   /* this must be the final entry */
     {0,          0,             0}
@@ -423,7 +425,10 @@
     /* open the file and parse its contents */
 
     if ((fin = fopen(fname, "r")) == null)
-        FileError(stderr, fname);
+    {
+        if (FileExists(fname))		/* quiet file open error on */
+            FileError(stderr, fname);   /* non-existent file */
+    }
     else
     {
         config_text = null;
@@ -533,6 +538,12 @@
     {
         QuoteAmpersand = yes;
         HideEndTags = no;
+    }
+
+ /* Avoid © in preserve-entities case */
+    if (PreserveEntities)
+    {
+       QuoteAmpersand = no;
     }
 }