ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/xdefaults.C
(Generate patch)

Comparing rxvt-unicode/src/xdefaults.C (file contents):
Revision 1.110 by root, Wed Aug 1 17:54:03 2007 UTC vs.
Revision 1.118 by ayin, Fri Oct 26 18:30:37 2007 UTC

109 BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"), 109 BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"),
110 BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), 110 BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"),
111 BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), 111 BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"),
112#if ENABLE_TRANSPARENCY 112#if ENABLE_TRANSPARENCY
113 BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), 113 BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"),
114 SWCH ("tr", Opt_transparent, 0, NULL), 114 BOOL (Rs_transparent, "transparent", "tr", Opt_transparent, 0, "inherit parent pixmap"),
115# if TINTING
116 STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), 115 STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"),
117# endif 116 STRG (Rs_shade, "shading", "sh", "%", "shade background by x %."),
118#endif 117#endif
119#if OFF_FOCUS_FADING 118#if OFF_FOCUS_FADING
120 STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"), 119 STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"),
121 STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"), 120 STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"),
122#endif
123#if TINTING
124 STRG (Rs_shade, "shading", "sh", "%", "shade background by x % when tinting."),
125#endif 121#endif
126 BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), 122 BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"),
127#ifndef NO_BELL 123#ifndef NO_BELL
128# if ENABLE_FRILLS 124# if ENABLE_FRILLS
129 BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL), 125 BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL),
190 RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), 186 RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"),
191#endif /* NO_CURSORCOLOR */ 187#endif /* NO_CURSORCOLOR */
192 STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), 188 STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"),
193 STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"), 189 STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"),
194 STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), 190 STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"),
195#ifdef XPM_BACKGROUND 191#ifdef BG_IMAGE_FROM_FILE
196 RSTRG (Rs_path, "path", "search path"), 192 RSTRG (Rs_path, "path", "search path"),
197 STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), 193 STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"),
198#endif 194#endif
199 /* fonts: command-line option = resource name */ 195 /* fonts: command-line option = resource name */
200 STRG (Rs_font, "font", "fn", "fontname", "normal text font"), 196 STRG (Rs_font, "font", "fn", "fontname", "normal text font"),
322#endif 318#endif
323 "," 319 ","
324#if OFF_FOCUS_FADING 320#if OFF_FOCUS_FADING
325 "fade," 321 "fade,"
326#endif 322#endif
327#if defined(XPM_BACKGROUND)
328 "XPM,"
329#endif
330#if defined(ENABLE_TRANSPARENCY) 323#if defined(ENABLE_TRANSPARENCY)
331 "transparent," 324 "transparent,"
325 "tint,"
332#endif 326#endif
333#if HAVE_AFTERIMAGE 327#if HAVE_AFTERIMAGE
334 "afterimage," 328 "afterimage,"
335#endif
336#if TINTING
337 "tint,"
338#endif 329#endif
339#if defined(USE_XIM) 330#if defined(USE_XIM)
340 "XIM," 331 "XIM,"
341#endif 332#endif
342#if defined(NO_BACKSPACE_KEY) 333#if defined(NO_BACKSPACE_KEY)
556 * default values 547 * default values
557 */ 548 */
558 549
559 if (optList[entry].doff != -1) 550 if (optList[entry].doff != -1)
560 { 551 {
561 if (flag == resval_on && !argv [i+1]) 552 if (flag == resval_on && i+1 == argc)
562 rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); 553 rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]);
563 554
564 rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; 555 rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef;
565 } 556 }
566 } 557 }
572 rs[optList[entry].doff] = flag; 563 rs[optList[entry].doff] = flag;
573 } 564 }
574 } 565 }
575 else 566 else
576#ifdef KEYSYM_RESOURCE 567#ifdef KEYSYM_RESOURCE
577 /* if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) */ 568 if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1))
578 if (rxvt_Str_match (opt, "keysym."))
579 { 569 {
580 const char *str = argv[++i]; 570 if (i+1 < argc)
581
582 if (str != NULL)
583 parse_keysym (opt + sizeof ("keysym.") - 1, str); 571 parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]);
584 } 572 }
585 else 573 else
586#endif 574#endif
587 { 575 {
588 bad_option = 1; 576 bad_option = 1;
679 char *newarg = NULL; 667 char *newarg = NULL;
680 char newargstr[NEWARGLIM]; 668 char newargstr[NEWARGLIM];
681 669
682 if (arg == NULL) 670 if (arg == NULL)
683 { 671 {
684 if ((n = rxvt_Str_match (str, "keysym.")) == 0) 672 n = sizeof ("keysym.") - 1;
673 if (strncmp (str, "keysym.", n))
685 return 0; 674 return 0;
686 675
687 str += n; /* skip `keysym.' */ 676 str += n; /* skip `keysym.' */
688 if (!(pmodend = strchr (str, ':'))) 677 if (!(pmodend = strchr (str, ':')))
689 return -1; 678 return -1;
762 strncpy (newargstr, arg, NEWARGLIM - 1); 751 strncpy (newargstr, arg, NEWARGLIM - 1);
763 newargstr[NEWARGLIM - 1] = '\0'; 752 newargstr[NEWARGLIM - 1] = '\0';
764 newarg = newargstr; 753 newarg = newargstr;
765 } 754 }
766 755
767 rxvt_Str_trim (newarg); 756 if (*newarg == '\0')
768 if (*newarg == '\0' || (n = rxvt_Str_escaped (newarg)) == 0)
769 return -1; 757 return -1;
770 758
771 keyboard->register_user_translation (sym, state, newarg); 759 keyboard->register_user_translation (sym, state, newarg);
772 return 1; 760 return 1;
773} 761}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines