ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.216 by root, Tue Dec 27 01:25:42 2005 UTC vs.
Revision 1.217 by root, Sat Dec 31 16:30:42 2005 UTC

147 147
148 text_t t = l.t[x]; 148 text_t t = l.t[x];
149 149
150 if (t != NOCHAR || !x) 150 if (t != NOCHAR || !x)
151 { 151 {
152 iso14755_51 (l.t[x], l.r[x]); 152 iso14755_51 (l.t[x], l.r[x], x, y);
153 iso14755buf = ISO_14755_54; 153 iso14755buf = ISO_14755_54;
154 break; 154 break;
155 } 155 }
156 156
157 x--; 157 x--;
158 } 158 }
159} 159}
160#endif 160#endif
161 161
162void
163rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y)
164{
162#if ENABLE_OVERLAY 165#if ENABLE_OVERLAY
163void
164rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
165{
166 rxvt_fontset *fs = FONTSET (r); 166 rxvt_fontset *fs = FONTSET (r);
167 rxvt_font *f = (*fs)[fs->find_font (ch)]; 167 rxvt_font *f = (*fs)[fs->find_font (ch)];
168 wchar_t *chr, *alloc, ch2, *fname; 168 wchar_t *chr, *alloc, ch2, *fname;
169 int len; 169 int len;
170 170
171 fname = rxvt_utf8towcs (f->name); 171 fname = rxvt_utf8towcs (f->name);
172 172
173#if ENABLE_COMBINING 173# if ENABLE_COMBINING
174 if (IS_COMPOSE (ch)) 174 if (IS_COMPOSE (ch))
175 { 175 {
176 len = rxvt_composite.expand (ch, 0); 176 len = rxvt_composite.expand (ch, 0);
177 alloc = chr = new wchar_t[len]; 177 alloc = chr = new wchar_t[len];
178 rxvt_composite.expand (ch, chr); 178 rxvt_composite.expand (ch, chr);
179 } 179 }
180 else 180 else
181#endif 181# endif
182 { 182 {
183 ch2 = ch; 183 ch2 = ch;
184 184
185 alloc = 0; 185 alloc = 0;
186 chr = &ch2; 186 chr = &ch2;
202 int width = wcswidth (fname, wcslen (fname)); 202 int width = wcswidth (fname, wcslen (fname));
203 203
204 max_it (width, 8+5); // for char + hey 204 max_it (width, 8+5); // for char + hey
205 max_it (width, strlen (attr)); 205 max_it (width, strlen (attr));
206 206
207 if (y >= 0)
208 {
209 y = (y >= nrow - len - 4 && x < width + 2) ? 0 : -1;
210 x = 0;
211 }
212
207 scr_overlay_new (0, -1, width, len + 2); 213 scr_overlay_new (x, y, width, len + 2);
208 214
209 r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r)); 215 r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r));
210 216
211 for (int y = 0; y < len; y++) 217 for (int y = 0; y < len; y++)
212 { 218 {
215 ch = *chr++; 221 ch = *chr++;
216 222
217 sprintf (buf, "%8x", ch); 223 sprintf (buf, "%8x", ch);
218 scr_overlay_set (0, y, buf); 224 scr_overlay_set (0, y, buf);
219 scr_overlay_set (9, y, '='); 225 scr_overlay_set (9, y, '=');
220#if !UNICODE3 226# if !UNICODE3
221 if (ch >= 0x10000) 227 if (ch >= 0x10000)
222 ch = 0xfffd; 228 ch = 0xfffd;
223#endif 229# endif
224 scr_overlay_set (11, y, ch, r); 230 scr_overlay_set (11, y, ch, r);
225 scr_overlay_set (12, y, NOCHAR, r); 231 scr_overlay_set (12, y, NOCHAR, r);
226 } 232 }
227 233
228 scr_overlay_set (0, len , attr); 234 scr_overlay_set (0, len , attr);
229 scr_overlay_set (0, len + 1, fname); 235 scr_overlay_set (0, len + 1, fname);
230 236
231 free (fname); 237 free (fname);
232 238
233#if ENABLE_COMBINING 239# if ENABLE_COMBINING
234 if (alloc) 240 if (alloc)
235 delete [] alloc; 241 delete [] alloc;
236#endif 242# endif
237}
238#endif 243#endif
244}
239 245
240void 246void
241rxvt_term::commit_iso14755 () 247rxvt_term::commit_iso14755 ()
242{ 248{
243 wchar_t ch[2]; 249 wchar_t ch[2];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines