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.417 by root, Tue Nov 23 22:58:09 2010 UTC vs.
Revision 1.422 by root, Thu Dec 16 23:03:50 2010 UTC

189#else 189#else
190 if (envv) 190 if (envv)
191#endif 191#endif
192 environ = envv; 192 environ = envv;
193} 193}
194
195struct localise_env
196{
197 char **orig_env;
198
199 localise_env (char **new_env)
200 {
201 orig_env = environ;
202 environ = new_env;
203 }
204
205 ~localise_env ()
206 {
207 environ = orig_env;
208 }
209};
194 210
195/* 211/*
196 ***************************************************************************** 212 *****************************************************************************
197 * STRUCTURES AND TYPEDEFS 213 * STRUCTURES AND TYPEDEFS
198 ***************************************************************************** 214 *****************************************************************************
951#define Screen_WrapNext (1<<4) /* need to wrap for next char? */ 967#define Screen_WrapNext (1<<4) /* need to wrap for next char? */
952#define Screen_DefaultFlags (Screen_VisibleCursor | Screen_Autowrap) 968#define Screen_DefaultFlags (Screen_VisibleCursor | Screen_Autowrap)
953 969
954/* rxvt_vars.options */ 970/* rxvt_vars.options */
955enum { 971enum {
956# define def(name,idx) Opt_ ## name = idx,
957# define nodef(name) Opt_ ## name = 0, 972# define def(name) Opt_ ## name,
973# define nodef(name) Opt_prev_ ## name, Opt_ ## name = 0, Opt_next_ ## name = Opt_prev_ ## name - 1,
974 Opt_0,
958# include "optinc.h" 975# include "optinc.h"
959# undef nodef 976# undef nodef
960# undef def 977# undef def
961Opt_count 978 Opt_count
962}; 979};
963 980
964/* ------------------------------------------------------------------------- */ 981/* ------------------------------------------------------------------------- */
965 982
966struct rxvt_vars : TermWin_t 983struct rxvt_vars : TermWin_t
1379 return base; 1396 return base;
1380 } 1397 }
1381 1398
1382 bool option (uint8_t opt) const NOTHROW 1399 bool option (uint8_t opt) const NOTHROW
1383 { 1400 {
1384 if (!opt)
1385 return 0;
1386
1387 --opt;
1388 return options[opt >> 3] & (1 << (opt & 7)); 1401 return options[opt >> 3] & (1 << (opt & 7));
1389 } 1402 }
1390 1403
1391 void set_option (uint8_t opt, bool set = true) NOTHROW 1404 void set_option (uint8_t opt, bool set = true) NOTHROW;
1392 {
1393 if (!opt)
1394 return;
1395
1396 --opt;
1397 if (set)
1398 options[opt >> 3] |= (1 << (opt & 7));
1399 else
1400 options[opt >> 3] &= ~(1 << (opt & 7));
1401 }
1402 1405
1403 void set_privmode (unsigned bit, int set) NOTHROW 1406 void set_privmode (unsigned bit, int set) NOTHROW
1404 { 1407 {
1405 if (set) 1408 if (set)
1406 priv_modes |= bit; 1409 priv_modes |= bit;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines