Ticket #8732: TermParse.cpp.patch

File TermParse.cpp.patch, 4.4 KB (added by tidux, 12 years ago)
Line 
1833a834
2> //printf("0: Reset attributes.\n");
3836,838c837,842
4< case 1: /* Bold */
5< case 5:
6< fAttr |= BOLD;
7---
8> case 1: /* Bright (increased intensity) or Bold */
9> //fAttr |= FORECOLORED(+8);
10> fAttr |= FORECOLORED(8);
11> //fAttr |= BOLD;
12> fAttr |= FORESET;
13> //printf("1: Bright/bold.\n");
14840c844,847
15<
16---
17>
18> case 3: /* Italic: on */
19> break;
20>
21843a851,856
22>
23> case 5: /* Blink:slow */
24> break;
25>
26> case 6: /* Blink:rapid */
27> break;
28848,850c861,862
29<
30< case 22: /* Not Bold */
31< fAttr &= ~BOLD;
32---
33>
34> case 8: /* Conceal */
35852c864,895
36<
37---
38>
39> case 9: /* Crossed-out */
40> break;
41>
42> case 10: /* Primary font */
43> break;
44>
45> case 11: /* n-th alternate font */
46> case 12:
47> case 13:
48> case 14:
49> case 15:
50> case 16:
51> case 17:
52> case 18:
53> case 19:
54> break;
55>
56> case 20: /* Fraktur */
57> break;
58>
59> case 2: /* Faint: decreased intensity */
60> case 21: /* Bright/Bold: off or Underline: Double */
61> case 22: /* Not Bold, not bright, not faint */
62> fAttr &= ~FORECOLORED(8);
63> fAttr |= FORESET;
64> //printf("22: Not bright/bold.\n");
65> break;
66>
67> case 23: /* Not italic, not fraktur */
68> break;
69>
70859a903,908
71>
72> case 28: /* Reveal */
73> break;
74>
75> case 29: /* Not crossed out */
76> break;
77861,862c910,911
78< case 30:
79< case 31:
80---
81> case 30: /* Set text colour */
82> case 31: /* 30 + x, x is from standard ANSI colour table. */
83869,870c918,922
84< fAttr &= ~FORECOLOR;
85< fAttr |= FORECOLORED(param[row] - 30);
86---
87> //fAttr &= ~FORECOLOR;
88>
89> //fAttr &= FORECOLORED(8);
90> fAttr &= ~FORECOLORED(7);
91> fAttr |= FORECOLORED(param[row] - 30);
92871a924
93>
94874c927
95< case 38:
96---
97> case 38: /* Set xterm-256 text colour(?) */
98878c931,934
99< fAttr &= ~FORECOLOR;
100---
101>
102> // Suggestion from pm:
103> fAttr &= ~FORECOLORED(255 - 8);
104> //fAttr &= ~FORECOLOR;
105887c943
106< case 39:
107---
108> case 39: /* Set default text colour */
109888a945
110> //printf("39: Default text colour.\n");
111891,892c948,959
112< case 40:
113< case 41:
114---
115> case 40: /* Set background color */
116> fAttr &= ~BACKCOLOR;
117> fAttr |= BACKCOLORED(0);
118> fAttr |= BACKSET;
119> //printf("Background: black.\n");
120> break;
121> case 41: /* 40 + x, x is from standard ANSI colour table. */
122> fAttr &= ~BACKCOLOR;
123> fAttr |= BACKCOLORED(1);
124> fAttr |= BACKSET;
125> //printf("Background: red.\n");
126> break;
127893a961,965
128> fAttr &= ~BACKCOLOR;
129> fAttr |= BACKCOLORED(2);
130> fAttr |= BACKSET;
131> //printf("Background: green.\n");
132> break;
133894a967,971
134> fAttr &= ~BACKCOLOR;
135> fAttr |= BACKCOLORED(3);
136> fAttr |= BACKSET;
137> //printf("Background: brown.\n");
138> break;
139895a973,980
140> //fAttr &= ~BACKCOLOR;
141> //fAttr |= BACKCOLORED(4);
142> //fAttr |= BACKSET;
143> fAttr &= ~BACKCOLOR;
144> fAttr |= BACKCOLORED(param[row] - 40);
145> fAttr |= BACKSET;
146> //printf("Background: blue.\n");
147> break;
148896a982,986
149> fAttr &= ~BACKCOLOR;
150> fAttr |= BACKCOLORED(5);
151> fAttr |= BACKSET;
152> //printf("Background: magenta.\n");
153> break;
154897a988,992
155> fAttr &= ~BACKCOLOR;
156> fAttr |= BACKCOLORED(6);
157> fAttr |= BACKSET;
158> //printf("Background: cyan.\n");
159> break;
160899a995,1004
161> fAttr |= BACKCOLORED(7);
162> fAttr |= BACKSET;
163> //printf("Background: gray.\n");
164> break;
165>
166> /*
167> //fAttr &= ~BACKCOLOR;
168>
169> fAttr &= ~BACKCOLOR;
170> //fAttr &= BACKCOLORED(8);
171901a1007
172>
173902a1009
174> */
175904c1011
176< case 48:
177---
178> case 48: /* Set xterm-256 background colour(?) */
179917c1024
180< case 49:
181---
182> case 49: /* Set default background colour */
183918a1026
184> //printf("49: Background: default colour.\n");