--- rxvt-unicode/src/xdefaults.C 2005/12/22 16:44:10 1.62 +++ rxvt-unicode/src/xdefaults.C 2006/01/06 05:37:59 1.73 @@ -6,7 +6,7 @@ * Copyright (c) 1994 Robert Nation * - original version * Copyright (c) 1997,1998 mj olesen - * Copyright (c) 2003-2004 Marc Lehmann + * Copyright (c) 2003-2006 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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 @@ -158,7 +163,6 @@ RSTRG (Rs_color + minCOLOR + 5, "color5", "color"), RSTRG (Rs_color + minCOLOR + 6, "color6", "color"), RSTRG (Rs_color + minCOLOR + 7, "color7", "color"), -#ifndef NO_BRIGHTCOLOR RSTRG (Rs_color + minBrightCOLOR + 0, "color8", "color"), RSTRG (Rs_color + minBrightCOLOR + 1, "color9", "color"), RSTRG (Rs_color + minBrightCOLOR + 2, "color10", "color"), @@ -167,7 +171,6 @@ RSTRG (Rs_color + minBrightCOLOR + 5, "color13", "color"), RSTRG (Rs_color + minBrightCOLOR + 6, "color14", "color"), RSTRG (Rs_color + minBrightCOLOR + 7, "color15", "color"), -#endif /* NO_BRIGHTCOLOR */ #ifndef NO_BOLD_UNDERLINE_REVERSE RSTRG (Rs_color + Color_BD, "colorBD", "color"), RSTRG (Rs_color + Color_IT, "colorIT", "color"), @@ -207,6 +210,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"), @@ -223,6 +227,7 @@ STRG (Rs_embed, NULL, "embed", "windowid", "window id to embed terminal in"), #endif #if ENABLE_FRILLS + RSTRG (Rs_transient_for, "transient-for", "windowid"), 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"), @@ -230,6 +235,7 @@ STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL), STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"), BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, "borderless window"), + BOOL (Rs_skipBuiltinGlyphs, "skipBuiltinGlyphs", "sbg", Opt_skipBuiltinGlyphs, "do not use internal glyphs"), STRG (Rs_lineSpace, "lineSpace", "lsp", "number", "number of extra pixels between rows"), #endif #ifdef POINTER_BLANK @@ -254,6 +260,12 @@ BOOL (Rs_secondaryScreen, "secondaryScreen", "ssc", Opt_secondaryScreen, "enable secondary screen"), BOOL (Rs_secondaryScroll, "secondaryScroll", "ssr", Opt_secondaryScroll, "enable secondary screen scroll"), #endif +#if ENABLE_PERL + RSTRG (Rs_perl_lib, "perl-lib", "string"), //, "colon-separated directories with extension scripts"),TODO + RSTRG (Rs_perl_eval, "perl-eval", "perl-eval"), // "string", "code to be evaluated after all extensions have been loaded"),TODO + RSTRG (Rs_perl_ext_1, "perl-ext-common", "string"), //, "colon-separated list of perl extensions to enable"),TODO + STRG (Rs_perl_ext_2, "perl-ext", "pe", "string", "colon-separated list of perl extensions to enable for this instance"), +#endif #if 0 && TODO #if !defined(NO_RESOURCES) && defined(USE_XGETDEFAULT) INFO ("xrm", "string", "X resource"), @@ -564,9 +576,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; @@ -858,9 +870,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); } } @@ -1030,9 +1042,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); } } }