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

Comparing rxvt-unicode/src/screen.C (file contents):
Revision 1.309 by root, Mon Jul 21 16:51:31 2008 UTC vs.
Revision 1.310 by root, Wed Jul 23 17:10:07 2008 UTC

2210 continue; 2210 continue;
2211 2211
2212 // redraw one or more characters 2212 // redraw one or more characters
2213 2213
2214 // seek to the beginning of wide characters 2214 // seek to the beginning of wide characters
2215 while (stp[col] == NOCHAR && col > 0) 2215 while (expect_false (stp[col] == NOCHAR && col > 0))
2216 --col; 2216 --col;
2217 2217
2218 rend_t rend = srp[col]; /* screen rendition (target rendtion) */ 2218 rend_t rend = srp[col]; /* screen rendition (target rendtion) */
2219 text_t *text = stp + col; 2219 text_t *text = stp + col;
2220 int count = 1; 2220 int count = 1;
2257 2257
2258 col--; /* went one too far. move back */ 2258 col--; /* went one too far. move back */
2259 count -= i; /* dump any matching trailing chars */ 2259 count -= i; /* dump any matching trailing chars */
2260 2260
2261 // sometimes we optimize away the trailing NOCHAR's, add them back 2261 // sometimes we optimize away the trailing NOCHAR's, add them back
2262 while (i && text[count] == NOCHAR) 2262 while (expect_false (i && text[count] == NOCHAR))
2263 count++, i--; 2263 count++, i--;
2264 2264
2265 /* 2265 /*
2266 * Determine the attributes for the string 2266 * Determine the attributes for the string
2267 */ 2267 */
2268 int fore = fgcolor_of (rend); // desired foreground 2268 int fore = fgcolor_of (rend); // desired foreground
2269 int back = bgcolor_of (rend); // desired background 2269 int back = bgcolor_of (rend); // desired background
2270 2270
2271 // only do special processing if any attributes are set, which is unlikely 2271 // only do special processing if any attributes are set, which is unlikely
2272 if (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful)) 2272 if (expect_false (rend & (RS_Bold | RS_Italic | RS_Uline | RS_RVid | RS_Blink | RS_Careful)))
2273 { 2273 {
2274 bool invert = rend & RS_RVid; 2274 bool invert = rend & RS_RVid;
2275 2275
2276#ifndef NO_BOLD_UNDERLINE_REVERSE 2276#ifndef NO_BOLD_UNDERLINE_REVERSE
2277 if (rend & RS_Bold && fore == Color_fg) 2277 if (rend & RS_Bold && fore == Color_fg)
2360 /* 2360 /*
2361 * Actually do the drawing of the string here 2361 * Actually do the drawing of the string here
2362 */ 2362 */
2363 rxvt_font *font = (*fontset[GET_STYLE (rend)])[GET_FONT (rend)]; 2363 rxvt_font *font = (*fontset[GET_STYLE (rend)])[GET_FONT (rend)];
2364 2364
2365 if (have_bg && back == Color_bg) 2365 if (expect_true (have_bg && back == Color_bg))
2366 { 2366 {
2367 // this is very ugly, maybe push it into ->draw? 2367 // this is very ugly, maybe push it into ->draw?
2368 2368
2369 for (i = 0; i < count; i++) /* don't draw empty strings */ 2369 for (i = 0; i < count; i++) /* don't draw empty strings */
2370 if (text[i] != ' ') 2370 if (text[i] != ' ')
2377 did_clear: ; 2377 did_clear: ;
2378 } 2378 }
2379 else 2379 else
2380 font->draw (*drawable, xpixel, ypixel, text, count, fore, back); 2380 font->draw (*drawable, xpixel, ypixel, text, count, fore, back);
2381 2381
2382 if (rend & RS_Uline && font->descent > 1 && fore != back) 2382 if (expect_false (rend & RS_Uline && font->descent > 1 && fore != back))
2383 { 2383 {
2384#if ENABLE_FRILLS 2384#if ENABLE_FRILLS
2385 if (ISSET_PIXCOLOR (Color_underline)) 2385 if (ISSET_PIXCOLOR (Color_underline))
2386 XSetForeground (dpy, gc, pix_colors[Color_underline]); 2386 XSetForeground (dpy, gc, pix_colors[Color_underline]);
2387 else 2387 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines