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

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.268 by ayin, Tue May 1 21:10:04 2007 UTC vs.
Revision 1.269 by root, Tue May 1 21:30:01 2007 UTC

687#define Col2Pixel(col) ((int32_t)Width2Pixel(col)) 687#define Col2Pixel(col) ((int32_t)Width2Pixel(col))
688#define Row2Pixel(row) ((int32_t)Height2Pixel(row)) 688#define Row2Pixel(row) ((int32_t)Height2Pixel(row))
689#define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) 689#define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth)
690#define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) 690#define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight)
691 691
692#define OPTION(opt) option(opt)
693
694// for m >= -n, ensure remainder lies between 0..n-1 692// for m >= -n, ensure remainder lies between 0..n-1
695#define MOD(m,n) (((m) + (n)) % (n)) 693#define MOD(m,n) (((m) + (n)) % (n))
696 694
697#define LINENO(n) MOD (term_start + int(n), total_rows) 695#define LINENO(n) MOD (term_start + int(n), total_rows)
698#define ROW(n) row_buf [LINENO (n)] 696#define ROW(n) row_buf [LINENO (n)]
1287 { 1285 {
1288 int base = GET_BASEFG (r); 1286 int base = GET_BASEFG (r);
1289#ifndef NO_BRIGHTCOLOR 1287#ifndef NO_BRIGHTCOLOR
1290 if (r & RS_Bold 1288 if (r & RS_Bold
1291# if ENABLE_STYLES 1289# if ENABLE_STYLES
1292 && OPTION (Opt_intensityStyles) 1290 && option (Opt_intensityStyles)
1293# endif 1291# endif
1294 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) 1292 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR))
1295 base += minBrightCOLOR - minCOLOR; 1293 base += minBrightCOLOR - minCOLOR;
1296#endif 1294#endif
1297 return base; 1295 return base;
1301 { 1299 {
1302 int base = GET_BASEBG (r); 1300 int base = GET_BASEBG (r);
1303#ifndef NO_BRIGHTCOLOR 1301#ifndef NO_BRIGHTCOLOR
1304 if (r & RS_Blink 1302 if (r & RS_Blink
1305# if ENABLE_STYLES 1303# if ENABLE_STYLES
1306 && OPTION (Opt_intensityStyles) 1304 && option (Opt_intensityStyles)
1307# endif 1305# endif
1308 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) 1306 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR))
1309 base += minBrightCOLOR - minCOLOR; 1307 base += minBrightCOLOR - minCOLOR;
1310#endif 1308#endif
1311 return base; 1309 return base;
1314 bool option (uint8_t opt) const NOTHROW 1312 bool option (uint8_t opt) const NOTHROW
1315 { 1313 {
1316 return options[opt >> 3] & (1 << (opt & 7)); 1314 return options[opt >> 3] & (1 << (opt & 7));
1317 } 1315 }
1318 1316
1319 void set_option (uint8_t opt, bool set) NOTHROW 1317 void set_option (uint8_t opt, bool set = true) NOTHROW
1320 { 1318 {
1321 if (set) 1319 if (set)
1322 options[opt >> 3] |= (1 << (opt & 7)); 1320 options[opt >> 3] |= (1 << (opt & 7));
1323 else 1321 else
1324 options[opt >> 3] &= ~(1 << (opt & 7)); 1322 options[opt >> 3] &= ~(1 << (opt & 7));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines