--- rxvt-unicode/src/xdefaults.C 2005/10/25 19:04:46 1.60 +++ rxvt-unicode/src/xdefaults.C 2005/12/31 17:16:17 1.64 @@ -37,6 +37,11 @@ #include "keyboard.h" #endif +/* place holders used for parsing command-line options */ +#define Optflag_Reverse 0x40000000UL +#define Optflag_Boolean 0x80000000UL +#define Optflag_mask 0x3fffffffUL + /* #define DEBUG_RESOURCES */ /*{{{ monolithic option/resource structure: */ @@ -60,7 +65,7 @@ /* BOOL () - regular boolean `-/+' flag */ #define BOOL(rsp, kw, opt, flag, desc) \ - { (Opt_Boolean| (flag)), (rsp), (kw), (opt), NULL, (desc)} + { (Optflag_Boolean | (flag)), (rsp), (kw), (opt), NULL, (desc)} /* SWCH () - `-' flag */ #define SWCH(opt, flag, desc) \ @@ -70,9 +75,9 @@ #define optList_strlen(i) \ (optList[i].flag ? 0 : (optList[i].arg ? strlen (optList[i].arg) : 1)) #define optList_isBool(i) \ - (optList[i].flag & Opt_Boolean) + (optList[i].flag & Optflag_Boolean) #define optList_isReverse(i) \ - (optList[i].flag & Opt_Reverse) + (optList[i].flag & Optflag_Reverse) #define optList_size \ (sizeof (optList) / sizeof (optList[0])) @@ -107,7 +112,7 @@ STRG (Rs_scrollBar_thickness, "thickness", "sbt", "number", "scrollbar thickness/width in pixels"), #endif BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, NULL), - BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_Reverse | Opt_scrollTtyOutput, "scroll-on-tty-output inhibit"), + BOOL (Rs_scrollTtyOutput, NULL, "si", Optflag_Reverse | Opt_scrollTtyOutput, "scroll-on-tty-output inhibit"), BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, "scroll-on-keypress"), BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, "scroll-with-buffer"), #if TRANSPARENT @@ -207,6 +212,7 @@ STRG (Rs_boldFont, "boldFont", "fb", "fontname", "bold font"), STRG (Rs_italicFont, "italicFont", "fi", "fontname", "italic font"), STRG (Rs_boldItalicFont, "boldItalicFont", "fbi", "fontname", "bold italic font"), + BOOL (Rs_intensityStyles, "intensityStyles", "is", Opt_intensityStyles, "font styles imply intensity changes"), #endif #ifdef USE_XIM STRG (Rs_inputMethod, "inputMethod", "im", "name", "name of input method"), @@ -224,6 +230,7 @@ #endif #if ENABLE_FRILLS STRG (Rs_pty_fd, NULL, "pty-fd", "fileno", "file descriptor of pty to use"), + BOOL (Rs_hold, "hold", "hold", Opt_hold, "retain window after shell exit"), STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"), STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL), STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL), @@ -563,9 +570,9 @@ optList[entry].opt, optList[entry].kw, flag); #endif if (flag == On) - options |= optList[entry].flag; + SET_OPTION (optList[entry].flag & Optflag_mask); else - options &= ~optList[entry].flag; + CLR_OPTION (optList[entry].flag & Optflag_mask); if (optList[entry].doff != -1) rs[optList[entry].doff] = flag; @@ -857,9 +864,9 @@ s = !s; if (s) - options |= optList[entry].flag; + SET_OPTION (optList[entry].flag & Optflag_mask); else - options &= ~optList[entry].flag; + CLR_OPTION (optList[entry].flag & Optflag_mask); } } @@ -909,7 +916,6 @@ int entry; # ifdef XrmEnumOneLevel - int i; char *displayResource, *xe; XrmName name_prefix[3]; XrmClass class_prefix[3]; @@ -1030,9 +1036,9 @@ s = !s; if (s) - options |= optList[entry].flag; + SET_OPTION (optList[entry].flag & Optflag_mask); else - options &= ~optList[entry].flag; + CLR_OPTION (optList[entry].flag & Optflag_mask); } } }