]> git.pld-linux.org Git - packages/xlhtml.git/blame - xlhtml-colors.patch
- verbose lib, man files
[packages/xlhtml.git] / xlhtml-colors.patch
CommitLineData
9469bccc
JB
1--- xlhtml/xlhtml/xlhtml.c.orig 2002-05-16 18:31:32.000000000 +0200
2+++ xlhtml/xlhtml/xlhtml.c 2006-09-19 00:39:14.441514500 +0200
3@@ -43,71 +43,71 @@
4 U8 **customColors = 0;
5 char colorTab[MAX_COLORS][8] =
6 {
7- "000000", /* FIXME: Need to find these first 8 colors! */
8- "FFFFFF",
9- "FFFFFF",
10- "FFFFFF",
11- "FFFFFF",
12- "FFFFFF",
13- "FFFFFF",
14- "FFFFFF",
15- "FFFFFF", /*0x08 - This one's Black, too ??? */
16- "FFFFFF", /* This one's normal */
17+ "#000000", /* FIXME: Need to find these first 8 colors! */
18+ "#FFFFFF",
19+ "#FFFFFF",
20+ "#FFFFFF",
21+ "#FFFFFF",
22+ "#FFFFFF",
23+ "#FFFFFF",
24+ "#FFFFFF",
25+ "#FFFFFF", /*0x08 - This one's Black, too ??? */
26+ "#FFFFFF", /* This one's normal */
27 "red", /* "FF0000", */
28 "lime", /* "00FF00", */
29 "blue", /* "0000FF", */
30- "FFFF00",
31- "FF00FF",
32+ "#FFFF00",
33+ "#FF00FF",
34 "aqua", /* "00FFFF", */
35- "800000", /* 0x10 */
36+ "#800000", /* 0x10 */
37 "green", /* "008000", */
38 "navy", /* "000080", */
39- "808000",
40- "800080",
41+ "#808000",
42+ "#800080",
43 "teal", /* "008080", */
44- "C0C0C0",
45+ "#C0C0C0",
46 "gray", /* "808080", */
47- "9999FF", /* 0x18 */
48- "993366",
49- "FFFFCC",
50- "CCFFFF",
51- "660066",
52- "FF8080",
53- "0066CC",
54- "CCCCFF",
55- "000080",
56- "FF00FF", /* 0x20 */
57- "FFFF00",
58- "00FFFF",
59- "800080",
60- "800000",
61- "008080",
62- "0000FF",
63- "00CCFF", /* 0x28 */
64- "CCFFFF",
65- "CCFFCC",
66- "FFFF99",
67- "99CCFF",
68- "FF99CC",
69- "CC99FF",
70- "FFCC99",
71- "3366FF", /* 0x30 */
72- "33CCCC",
73- "99CC00",
74- "FFCC00",
75- "FF9900",
76- "FF6600",
77- "666699",
78- "969696",
79- "003366", /* 0x38 */
80- "339966",
81- "003300",
82- "333300",
83- "993300",
84- "993366",
85- "333399",
86- "333333",
87- "FFFFFF" /* 0x40 */
88+ "#9999FF", /* 0x18 */
89+ "#993366",
90+ "#FFFFCC",
91+ "#CCFFFF",
92+ "#660066",
93+ "#FF8080",
94+ "#0066CC",
95+ "#CCCCFF",
96+ "#000080",
97+ "#FF00FF", /* 0x20 */
98+ "#FFFF00",
99+ "#00FFFF",
100+ "#800080",
101+ "#800000",
102+ "#008080",
103+ "#0000FF",
104+ "#00CCFF", /* 0x28 */
105+ "#CCFFFF",
106+ "#CCFFCC",
107+ "#FFFF99",
108+ "#99CCFF",
109+ "#FF99CC",
110+ "#CC99FF",
111+ "#FFCC99",
112+ "#3366FF", /* 0x30 */
113+ "#33CCCC",
114+ "#99CC00",
115+ "#FFCC00",
116+ "#FF9900",
117+ "#FF6600",
118+ "#666699",
119+ "#969696",
120+ "#003366", /* 0x38 */
121+ "#339966",
122+ "#003300",
123+ "#333300",
124+ "#993300",
125+ "#993366",
126+ "#333399",
127+ "#333333",
128+ "#FFFFFF" /* 0x40 */
129 };
130
131 int DatesR1904 = 0; /*!< Flag that the dates are based on McIntosh Dates system */
132@@ -1765,7 +1765,7 @@
133 green = (unsigned char)working_buffer[(4*i)+3];
134 blue = (unsigned char)working_buffer[(4*i)+4];
135 /* printf("%02X%02X%02X\n", (int)red, (int)green, (int)blue); */
136- sprintf(color_string, "%02X%02X%02X", (int)red, (int)green, (int)blue);
137+ sprintf(color_string, "#%02X%02X%02X", (int)red, (int)green, (int)blue);
138 customColors[i] = (U8 *)strdup(color_string);
139 }
140 }
141@@ -2630,7 +2630,7 @@
142 {
143 if (fgcolor < numCustomColors)
144 {
145- if (strcmp(default_background_color, (char *)customColors[fgcolor-8]) != 0)
146+ if (strcmp(default_background_color, ((char *)customColors[fgcolor-8]) + 1) != 0)
147 printf(" BGCOLOR=\"%s\"", customColors[fgcolor-8]);
148 }
149 }
150@@ -2638,7 +2638,7 @@
151 {
152 if (fgcolor < MAX_COLORS)
153 {
154- if (strcmp(default_background_color, colorTab[fgcolor]) != 0)
155+ if (strcmp(default_background_color, colorTab[fgcolor] + (colorTab[fgcolor][0] == '#')) != 0)
156 printf(" BGCOLOR=\"%s\"", colorTab[fgcolor]);
157 }
158 }
159@@ -2657,7 +2657,7 @@
160 { /* if they are all the same...do it...that is if it's different from BLACK */
161 if (numCustomColors == 0) /* Don't do custom borders */
162 {
163- if ((strcmp(colorTab[lcolor], "000000") != 0)&&(strcmp(colorTab[lcolor], "FFFFFF") != 0))
164+ if ((strcmp(colorTab[lcolor], "#000000") != 0)&&(strcmp(colorTab[lcolor], "#FFFFFF") != 0))
165 {
166 if( !xml )
167 printf(" BORDERCOLOR=\"%s\"", colorTab[lcolor]);
168@@ -3876,16 +3876,16 @@
169 if ((font_array[fnt_idx]->c_idx < numCustomColors)&&use_colors)
170 strcpy(color, (char *)customColors[font_array[fnt_idx]->c_idx-8]);
171 else
172- strcpy(color, "000000");
173+ strcpy(color, "#000000");
174 }
175 else
176 {
177 if ((font_array[fnt_idx]->c_idx < MAX_COLORS)&&use_colors)
178 strcpy(color, colorTab[font_array[fnt_idx]->c_idx]);
179 else
180- strcpy(color, "000000");
181+ strcpy(color, "#000000");
182 }
183- if (strcmp(color, "000000") != 0)
184+ if (strcmp(color, "#000000") != 0)
185 {
186 if (h->fflag)
187 printf(" COLOR=\"%s\"", color);
This page took 0.05094 seconds and 4 git commands to generate.