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.23 by pcg, Fri Apr 2 18:00:01 2004 UTC vs.
Revision 1.28 by root, Fri Jul 30 22:36:42 2004 UTC

1/*--------------------------------*-C-*---------------------------------* 1/*--------------------------------*-C-*---------------------------------*
2 * File: xdefaults.c 2 * File: xdefaults.C
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * $Id: xdefaults.C,v 1.23 2004/04/02 18:00:01 pcg Exp $
5 * 4 *
6 * All portions of code are copyright by their respective author/s. 5 * All portions of code are copyright by their respective author/s.
7 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> 6 * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com>
8 * - original version 7 * - original version
9 * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> 8 * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca>
9 * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or 13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version. 14 * (at your option) any later version.
109 SWCH ("tr", Opt_transparent, NULL), 109 SWCH ("tr", Opt_transparent, NULL),
110#if TINTING 110#if TINTING
111 STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), 111 STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"),
112#endif 112#endif
113#endif 113#endif
114#ifdef OFF_FOCUS_FADING
115 STRG (Rs_fade, "fading", "fade", "%", "make colors x% darker when urxvt is losing focus."),
116#endif
117#ifdef TINTING
118 STRG (Rs_shade, "shading", "sh", "%", "shade background by x% when tinting."),
119#endif
114 BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, "utmp inhibit"), 120 BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, "utmp inhibit"),
115#ifndef NO_BELL 121#ifndef NO_BELL
116 BOOL (Rs_visualBell, "visualBell", "vb", Opt_visualBell, "visual bell"), 122 BOOL (Rs_visualBell, "visualBell", "vb", Opt_visualBell, "visual bell"),
117# if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION) 123# if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION)
118 BOOL (Rs_mapAlert, "mapAlert", NULL, Opt_mapAlert, NULL), 124 BOOL (Rs_mapAlert, "mapAlert", NULL, Opt_mapAlert, NULL),
153 RSTRG (Rs_color + minBrightCOLOR + 5, "color13", "color"), 159 RSTRG (Rs_color + minBrightCOLOR + 5, "color13", "color"),
154 RSTRG (Rs_color + minBrightCOLOR + 6, "color14", "color"), 160 RSTRG (Rs_color + minBrightCOLOR + 6, "color14", "color"),
155 RSTRG (Rs_color + minBrightCOLOR + 7, "color15", "color"), 161 RSTRG (Rs_color + minBrightCOLOR + 7, "color15", "color"),
156#endif /* NO_BRIGHTCOLOR */ 162#endif /* NO_BRIGHTCOLOR */
157#ifndef NO_BOLD_UNDERLINE_REVERSE 163#ifndef NO_BOLD_UNDERLINE_REVERSE
164 BOOL (Rs_realBold, "realBold", "rb", Opt_realBold, "use bold fonts for bold text"),
158 RSTRG (Rs_color + Color_BD, "colorBD", "color"), 165 RSTRG (Rs_color + Color_BD, "colorBD", "color"),
159 RSTRG (Rs_color + Color_UL, "colorUL", "color"), 166 RSTRG (Rs_color + Color_UL, "colorUL", "color"),
160 RSTRG (Rs_color + Color_RV, "colorRV", "color"), 167 RSTRG (Rs_color + Color_RV, "colorRV", "color"),
161#endif /* ! NO_BOLD_UNDERLINE_REVERSE */ 168#endif /* ! NO_BOLD_UNDERLINE_REVERSE */
162#ifdef KEEP_SCROLLCOLOR 169#ifdef KEEP_SCROLLCOLOR
461 468
462 if (entry < optList_size ()) 469 if (entry < optList_size ())
463 { 470 {
464 if (optList_isReverse (entry)) 471 if (optList_isReverse (entry))
465 flag = flag == On ? Off : On; 472 flag = flag == On ? Off : On;
473
466 if (optList_strlen (entry)) 474 if (optList_strlen (entry))
467 { /* string value */
468 const char *str = argv[++i];
469
470#ifdef DEBUG_RESOURCES
471 fprintf (stderr, "string (%s,%s) = ",
472 optList[entry].opt ? optList[entry].opt : "nil",
473 optList[entry].kw ? optList[entry].kw : "nil");
474#endif
475 if (flag == On && str && (optList[entry].doff != -1))
476 { 475 {
477#ifdef DEBUG_RESOURCES
478 fprintf (stderr, "\"%s\"\n", str);
479#endif
480 rs[optList[entry].doff] = str;
481 /* 476 /*
482 * special cases are handled in main.c:main () to allow 477 * special cases are handled in main.c:main () to allow
483 * X resources to set these values before we settle for 478 * X resources to set these values before we settle for
484 * default values 479 * default values
485 */ 480 */
486 }
487#ifdef DEBUG_RESOURCES
488 else
489 fprintf (stderr, "???\n");
490#endif
491 481
482 if (optList[entry].doff != -1)
483 rs[optList[entry].doff] = flag == On && argv[i+1]
484 ? argv[++i] : 0;
492 } 485 }
493 else 486 else
494 { /* boolean value */ 487 { /* boolean value */
495#ifdef DEBUG_RESOURCES 488#ifdef DEBUG_RESOURCES
496 fprintf (stderr, "boolean (%s,%s) = %s\n", 489 fprintf (stderr, "boolean (%s,%s) = %s\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines