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.82 by root, Fri Jan 20 10:27:08 2006 UTC vs.
Revision 1.85 by root, Wed Jan 25 21:03:04 2006 UTC

33 33
34/* place holders used for parsing command-line options */ 34/* place holders used for parsing command-line options */
35#define Optflag_Reverse 0x40000000UL 35#define Optflag_Reverse 0x40000000UL
36#define Optflag_Boolean 0x80000000UL 36#define Optflag_Boolean 0x80000000UL
37#define Optflag_mask 0x3fffffffUL 37#define Optflag_mask 0x3fffffffUL
38
39/* #define DEBUG_RESOURCES */
40 38
41/*{{{ monolithic option/resource structure: */ 39/*{{{ monolithic option/resource structure: */
42/* 40/*
43 * `string' options MUST have a usage argument 41 * `string' options MUST have a usage argument
44 * `switch' and `boolean' options have no argument 42 * `switch' and `boolean' options have no argument
218#if ENABLE_FRILLS 216#if ENABLE_FRILLS
219 RSTRG (Rs_transient_for, "transient-for", "windowid"), 217 RSTRG (Rs_transient_for, "transient-for", "windowid"),
220 BOOL (Rs_override_redirect, "override-redirect", "override-redirect", Opt_override_redirect, "set override-redirect on the terminal window"), 218 BOOL (Rs_override_redirect, "override-redirect", "override-redirect", Opt_override_redirect, "set override-redirect on the terminal window"),
221 STRG (Rs_pty_fd, NULL, "pty-fd", "fileno", "file descriptor of pty to use"), 219 STRG (Rs_pty_fd, NULL, "pty-fd", "fileno", "file descriptor of pty to use"),
222 BOOL (Rs_hold, "hold", "hold", Opt_hold, "retain window after shell exit"), 220 BOOL (Rs_hold, "hold", "hold", Opt_hold, "retain window after shell exit"),
221 STRG (Rs_depth, "depth", "depth", "number", "depth of visual to request"),
223 STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"), 222 STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"),
224 STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL), 223 STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL),
225 STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL), 224 STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL),
226 STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"), 225 STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"),
227 BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, "borderless window"), 226 BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, "borderless window"),
318#if defined(TRANSPARENT) 317#if defined(TRANSPARENT)
319 "transparent," 318 "transparent,"
320#endif 319#endif
321#if TINTING 320#if TINTING
322 "tint," 321 "tint,"
323#endif
324#if defined(UTMP_SUPPORT)
325 "utmp,"
326#endif 322#endif
327#if defined(USE_XIM) 323#if defined(USE_XIM)
328 "XIM," 324 "XIM,"
329#endif 325#endif
330 "scrollbars=" 326 "scrollbars="
364 "8bitctrls," 360 "8bitctrls,"
365#endif 361#endif
366#if defined(ENABLE_FRILLS) 362#if defined(ENABLE_FRILLS)
367 "frills," 363 "frills,"
368#endif 364#endif
369#if defined(PREFER_24BIT)
370 "24bit,"
371#endif
372#if defined(SELECTION_SCROLLING) 365#if defined(SELECTION_SCROLLING)
373 "selectionscrolling," 366 "selectionscrolling,"
374#endif 367#endif
375#if MOUSE_WHEEL 368#if MOUSE_WHEEL
376 "wheel," 369 "wheel,"
495 { 488 {
496 unsigned int entry, longopt = 0; 489 unsigned int entry, longopt = 0;
497 const char *flag, *opt; 490 const char *flag, *opt;
498 491
499 opt = argv[i]; 492 opt = argv[i];
500#ifdef DEBUG_RESOURCES 493
501 fprintf (stderr, "argv[%d] = %s: ", i, opt);
502#endif
503 if (*opt == '-') 494 if (*opt == '-')
504 { 495 {
505 flag = On; 496 flag = On;
506 if (*++opt == '-') 497 if (*++opt == '-')
507 longopt = *opt++; /* long option */ 498 longopt = *opt++; /* long option */
548 rs[optList[entry].doff] = flag == On && argv[i+1] 539 rs[optList[entry].doff] = flag == On && argv[i+1]
549 ? argv[++i] : 0; 540 ? argv[++i] : 0;
550 } 541 }
551 else 542 else
552 { /* boolean value */ 543 { /* boolean value */
553#ifdef DEBUG_RESOURCES
554 fprintf (stderr, "boolean (%s,%s) = %s\n",
555 optList[entry].opt, optList[entry].kw, flag);
556#endif
557 set_option (optList[entry].flag & Optflag_mask, flag == On); 544 set_option (optList[entry].flag & Optflag_mask, flag == On);
558 545
559 if (optList[entry].doff != -1) 546 if (optList[entry].doff != -1)
560 rs[optList[entry].doff] = flag; 547 rs[optList[entry].doff] = flag;
561 } 548 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines