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.419 by root, Tue Dec 7 17:51:27 2010 UTC vs.
Revision 1.420 by root, Tue Dec 7 19:05:35 2010 UTC

1380 return base; 1380 return base;
1381 } 1381 }
1382 1382
1383 bool option (uint8_t opt) const NOTHROW 1383 bool option (uint8_t opt) const NOTHROW
1384 { 1384 {
1385 if (!opt)
1386 return 0;
1387
1388 --opt;
1389 return options[opt >> 3] & (1 << (opt & 7)); 1385 return options[opt >> 3] & (1 << (opt & 7));
1390 } 1386 }
1391 1387
1392 void set_option (uint8_t opt, bool set = true) NOTHROW 1388 void set_option (uint8_t opt, bool set = true) NOTHROW
1393 { 1389 {
1394 if (!opt) 1390 if (!opt)
1395 return; 1391 return;
1396 1392
1397 --opt; 1393 uint8_t mask = 1 << (opt & 7);
1398 if (set) 1394 uint8_t &val = options [opt >> 3];
1399 options[opt >> 3] |= (1 << (opt & 7)); 1395
1400 else 1396 val = val & ~mask | (set ? 0 : mask);
1401 options[opt >> 3] &= ~(1 << (opt & 7));
1402 } 1397 }
1403 1398
1404 void set_privmode (unsigned bit, int set) NOTHROW 1399 void set_privmode (unsigned bit, int set) NOTHROW
1405 { 1400 {
1406 if (set) 1401 if (set)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines