--- rxvt-unicode/src/xdefaults.C 2007/06/08 20:40:07 1.103 +++ rxvt-unicode/src/xdefaults.C 2007/08/27 20:50:38 1.112 @@ -34,6 +34,7 @@ /* place holders used for parsing command-line options */ #define Optflag_Reverse 1 #define Optflag_Boolean 2 +#define Optflag_Switch 4 /* monolithic option/resource structure: */ /* @@ -60,7 +61,7 @@ /* SWCH () - `-' flag */ #define SWCH(opt, option, flag, desc) \ - { (option), (Optflag_Boolean | (flag)), -1, NULL, (opt), NULL, (desc)} + { (option), (Optflag_Switch | (flag)), -1, NULL, (opt), NULL, (desc)} /* convenient macros */ #define optList_strlen(i) \ @@ -94,6 +95,7 @@ BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, 0, "reverse video"), BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, 0, "login shell"), BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, 0, "jump scrolling"), + BOOL (Rs_skipScroll, "skipScroll", "ss", Opt_skipScroll, 0, "skip scrolling"), BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, 0, "tab characters are pastable"), #if HAVE_SCROLLBARS RSTRG (Rs_scrollstyle, "scrollstyle", "mode"), @@ -107,20 +109,16 @@ BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"), BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), -#if TRANSPARENT +#if ENABLE_TRANSPARENCY BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), SWCH ("tr", Opt_transparent, 0, NULL), -# if TINTING STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), -# endif + STRG (Rs_shade, "shading", "sh", "%", "shade background by x %."), #endif #if OFF_FOCUS_FADING STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"), STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"), #endif -#if TINTING - STRG (Rs_shade, "shading", "sh", "%", "shade background by x % when tinting."), -#endif BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), #ifndef NO_BELL # if ENABLE_FRILLS @@ -260,10 +258,12 @@ 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 ISO_14755 + BOOL (Rs_iso14755_52, "iso14755_52", NULL, Opt_iso14755_52, 0, NULL), +#endif #ifdef HAVE_AFTERIMAGE STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."), - STRG (Rs_blurradius, "blurRadius", "blr", "number", "Gaussian Blur radius to apply to the root background"), + STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "Gaussian Blur radii to apply to the root background"), #endif #ifndef NO_RESOURCES INFO ("xrm", "string", "X resource"), @@ -323,12 +323,13 @@ #if defined(XPM_BACKGROUND) "XPM," #endif -#if defined(TRANSPARENT) +#if defined(ENABLE_TRANSPARENCY) "transparent," -#endif -#if TINTING "tint," #endif +#if HAVE_AFTERIMAGE + "afterimage," +#endif #if defined(USE_XIM) "XIM," #endif @@ -540,7 +541,6 @@ { if (optList_isReverse (entry)) flag = flag == resval_on ? resval_off : resval_on; -fprintf( stderr, "entry = %d, opt = [%s], flag = 0x%X, resval_on = %d\n", entry, opt, *flag, *resval_on ); if (optList_strlen (entry)) { @@ -549,7 +549,7 @@ * X resources to set these values before we settle for * default values */ -fprintf( stderr, "string\n"); + if (optList[entry].doff != -1) { if (flag == resval_on && !argv [i+1]) @@ -568,8 +568,7 @@ } else #ifdef KEYSYM_RESOURCE - /* if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) */ - if (rxvt_Str_match (opt, "keysym.")) + if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) { const char *str = argv[++i]; @@ -675,7 +674,8 @@ if (arg == NULL) { - if ((n = rxvt_Str_match (str, "keysym.")) == 0) + n = sizeof ("keysym.") - 1; + if (strncmp (str, "keysym.", n)) return 0; str += n; /* skip `keysym.' */