--- rxvt-unicode/src/xdefaults.C 2007/07/31 22:24:36 1.109 +++ rxvt-unicode/src/xdefaults.C 2007/11/22 12:31:49 1.121 @@ -111,18 +111,14 @@ BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), #if ENABLE_TRANSPARENCY BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), - SWCH ("tr", Opt_transparent, 0, NULL), -# if TINTING + BOOL (Rs_transparent, "transparent", "tr", Opt_transparent, 0, "inherit parent pixmap"), 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 @@ -173,14 +169,14 @@ RSTRG (Rs_color + Color_IT, "colorIT", "color"), RSTRG (Rs_color + Color_UL, "colorUL", "color"), RSTRG (Rs_color + Color_RV, "colorRV", "color"), -#endif /* ! NO_BOLD_UNDERLINE_REVERSE */ +#endif /* ! NO_BOLD_UNDERLINE_REVERSE */ #if ENABLE_FRILLS RSTRG (Rs_color + Color_underline, "underlineColor", "color"), #endif #ifdef KEEP_SCROLLCOLOR RSTRG (Rs_color + Color_scroll, "scrollColor", "color"), RSTRG (Rs_color + Color_trough, "troughColor", "color"), -#endif /* KEEP_SCROLLCOLOR */ +#endif /* KEEP_SCROLLCOLOR */ #ifdef OPTION_HC STRG (Rs_color + Color_HC, "highlightColor", "hc", "color", "highlight color"), #endif @@ -188,11 +184,11 @@ STRG (Rs_color + Color_cursor, "cursorColor", "cr", "color", "cursor color"), /* command-line option = resource name */ RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), -#endif /* NO_CURSORCOLOR */ +#endif /* NO_CURSORCOLOR */ STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"), STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), -#ifdef XPM_BACKGROUND +#ifdef BG_IMAGE_FROM_FILE RSTRG (Rs_path, "path", "search path"), STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), #endif @@ -209,7 +205,7 @@ STRG (Rs_preeditType, "preeditType", "pt", "style", "input style: style = OverTheSpot|OffTheSpot|Root"), STRG (Rs_imLocale, "imLocale", "imlocale", "string", "locale to use for input method"), STRG (Rs_imFont, "imFont", "imfont", "fontname", "fontset for styles OverTheSpot and OffTheSpot"), -#endif /* USE_XIM */ +#endif /* USE_XIM */ STRG (Rs_name, NULL, "name", "string", "client instance, icon, and title strings"), STRG (Rs_title, "title", "title", "string", "title name for window"), STRG (Rs_title, NULL, "T", NULL, NULL), /* short form */ @@ -250,7 +246,7 @@ STRG (Rs_modifier, "modifier", "mod", "modifier", "meta modifier = alt|meta|hyper|super|mod1|...|mod5"), #ifdef CUTCHAR_RESOURCE RSTRG (Rs_cutchars, "cutchars", "string"), -#endif /* CUTCHAR_RESOURCE */ +#endif /* CUTCHAR_RESOURCE */ RSTRG (Rs_answerbackstring, "answerbackString", "string"), #ifndef NO_SECONDARY_SCREEN BOOL (Rs_secondaryScreen, "secondaryScreen", "ssc", Opt_secondaryScreen, 0, "enable secondary screen"), @@ -324,15 +320,13 @@ #if OFF_FOCUS_FADING "fade," #endif -#if defined(XPM_BACKGROUND) - "XPM," -#endif #if defined(ENABLE_TRANSPARENCY) "transparent," -#endif -#if TINTING "tint," #endif +#if HAVE_AFTERIMAGE + "afterimage," +#endif #if defined(USE_XIM) "XIM," #endif @@ -555,8 +549,8 @@ if (optList[entry].doff != -1) { - if (flag == resval_on && !argv [i+1]) - rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); + if (flag == resval_on && i+1 == argc) + rxvt_fatal ("option '%s' requires an argument, aborting.\n", argv [i]); rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; } @@ -569,22 +563,18 @@ rs[optList[entry].doff] = flag; } } - else #ifdef KEYSYM_RESOURCE - /* if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) */ - if (rxvt_Str_match (opt, "keysym.")) - { - const char *str = argv[++i]; - - if (str != NULL) - parse_keysym (opt + sizeof ("keysym.") - 1, str); - } - else -#endif - { - bad_option = 1; - rxvt_warn ("\"%s\": unknown or malformed option.\n", opt); - } + else if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) + { + if (i+1 < argc) + parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]); + } +#endif + else + { + bad_option = 1; + rxvt_warn ("\"%s\": unknown or malformed option.\n", opt); + } } if (bad_option) @@ -678,7 +668,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.' */ @@ -761,16 +752,15 @@ newarg = newargstr; } - rxvt_Str_trim (newarg); - if (*newarg == '\0' || (n = rxvt_Str_escaped (newarg)) == 0) + if (*newarg == '\0') return -1; keyboard->register_user_translation (sym, state, newarg); return 1; } -# endif /* KEYSYM_RESOURCE */ -#endif /* NO_RESOURCES */ +# endif /* KEYSYM_RESOURCE */ +#endif /* NO_RESOURCES */ static char * get_res (XrmDatabase database, const char *program, const char *option) @@ -874,7 +864,7 @@ # endif # endif -#endif /* NO_RESOURCES */ +#endif /* NO_RESOURCES */ } /*----------------------- end-of-file (C source) -----------------------*/