1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: xdefaults.c |
2 | * File: xdefaults.c |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * $Id: xdefaults.C,v 1.3 2003/11/25 11:52:42 pcg Exp $ |
4 | * $Id: xdefaults.C,v 1.7 2004/01/16 22:26:18 pcg Exp $ |
5 | * |
5 | * |
6 | * All portions of code are copyright by their respective author/s. |
6 | * All portions of code are copyright by their respective author/s. |
7 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
7 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
8 | * - original version |
8 | * - original version |
9 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
9 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
… | |
… | |
141 | #endif |
141 | #endif |
142 | #ifdef CURSOR_BLINK |
142 | #ifdef CURSOR_BLINK |
143 | BOOL(Rs_cursorBlink, "cursorBlink", "bc", Opt_cursorBlink, "blinking cursor"), |
143 | BOOL(Rs_cursorBlink, "cursorBlink", "bc", Opt_cursorBlink, "blinking cursor"), |
144 | #endif |
144 | #endif |
145 | #ifdef POINTER_BLANK |
145 | #ifdef POINTER_BLANK |
146 | BOOL(Rs_pointerBlank, "pointerBlank", NULL, Opt_pointerBlank, NULL), |
146 | BOOL(Rs_pointerBlank, "pointerBlank", "pb", Opt_pointerBlank, "switch off pointer after delay"), |
147 | #endif |
147 | #endif |
148 | STRG(Rs_color + Color_bg, "background", "bg", "color", "background color"), |
148 | STRG(Rs_color + Color_bg, "background", "bg", "color", "background color"), |
149 | STRG(Rs_color + Color_fg, "foreground", "fg", "color", "foreground color"), |
149 | STRG(Rs_color + Color_fg, "foreground", "fg", "color", "foreground color"), |
150 | RSTRG(Rs_color + minCOLOR + 0, "color0", "color"), |
150 | RSTRG(Rs_color + minCOLOR + 0, "color0", "color"), |
151 | RSTRG(Rs_color + minCOLOR + 1, "color1", "color"), |
151 | RSTRG(Rs_color + minCOLOR + 1, "color1", "color"), |
… | |
… | |
185 | "background pixmap"), |
185 | "background pixmap"), |
186 | #endif /* XPM_BACKGROUND */ |
186 | #endif /* XPM_BACKGROUND */ |
187 | #if (MENUBAR_MAX) |
187 | #if (MENUBAR_MAX) |
188 | RSTRG(Rs_menu, "menu", "name[;tag]"), |
188 | RSTRG(Rs_menu, "menu", "name[;tag]"), |
189 | #endif |
189 | #endif |
190 | #ifndef NO_BOLDFONT |
|
|
191 | STRG(Rs_boldFont, "boldFont", "fb", "fontname", "bold text font"), |
|
|
192 | #endif |
|
|
193 | STRG(Rs_font + 0, "font", "fn", "fontname", "normal text font"), |
190 | STRG(Rs_font, "font", "fn", "fontname", "normal text font"), |
194 | /* fonts: command-line option = resource name */ |
191 | /* fonts: command-line option = resource name */ |
195 | #ifdef MULTICHAR_SET |
|
|
196 | STRG(Rs_multichar_encoding, "multichar_encoding", "km", "mode", |
|
|
197 | "multichar encoding; mode = eucj|sjis|big5|gb|kr|noenc"), |
|
|
198 | #endif /* MULTICHAR_SET */ |
|
|
199 | #ifdef USE_XIM |
192 | #ifdef USE_XIM |
200 | STRG(Rs_inputMethod, "inputMethod", "im", "name", "name of input method"), |
193 | STRG(Rs_inputMethod, "inputMethod", "im", "name", "name of input method"), |
201 | STRG(Rs_preeditType, "preeditType", "pt", "style", |
194 | STRG(Rs_preeditType, "preeditType", "pt", "style", |
202 | "input style: style = OverTheSpot|OffTheSpot|Root"), |
195 | "input style: style = OverTheSpot|OffTheSpot|Root"), |
|
|
196 | #if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) |
|
|
197 | STRG(Rs_imLocale, "imLocale", "imlocale", "string", "locale to use for input method"), |
|
|
198 | #endif |
203 | #endif /* USE_XIM */ |
199 | #endif /* USE_XIM */ |
204 | #ifdef GREEK_SUPPORT |
200 | #ifdef GREEK_SUPPORT |
205 | STRG(Rs_greek_keyboard, "greek_keyboard", "grk", "mode", |
201 | STRG(Rs_greek_keyboard, "greek_keyboard", "grk", "mode", |
206 | "greek keyboard mapping; mode = iso | ibm"), |
202 | "greek keyboard mapping; mode = iso | ibm"), |
207 | RSTRG(Rs_greektoggle_key, "greektoggle_key", "keysym"), |
203 | RSTRG(Rs_greektoggle_key, "greektoggle_key", "keysym"), |
… | |
… | |
534 | |
530 | |
535 | if (str != NULL) |
531 | if (str != NULL) |
536 | rxvt_parse_keysym(aR_ opt + sizeof("keysym.") - 1, str); |
532 | rxvt_parse_keysym(aR_ opt + sizeof("keysym.") - 1, str); |
537 | } else |
533 | } else |
538 | #endif |
534 | #endif |
539 | ; |
535 | bad_option = 1; |
540 | } |
536 | } |
541 | |
537 | |
542 | if (bad_option) |
538 | if (bad_option) |
543 | rxvt_usage(0); |
539 | rxvt_usage(0); |
544 | } |
540 | } |
… | |
… | |
681 | for (entry = 0; entry < optList_size(); entry++) { |
677 | for (entry = 0; entry < optList_size(); entry++) { |
682 | const char *kw = optList[entry].kw; |
678 | const char *kw = optList[entry].kw; |
683 | |
679 | |
684 | if (kw == NULL) |
680 | if (kw == NULL) |
685 | continue; |
681 | continue; |
686 | n = STRLEN(kw); |
682 | n = STRLEN (kw); |
687 | if (str[n] == ':' && rxvt_Str_match(str, kw)) { |
683 | if (str[n] == ':' && rxvt_Str_match(str, kw)) { |
688 | /* skip `keyword:' */ |
684 | /* skip `keyword:' */ |
689 | str += (n + 1); |
685 | str += (n + 1); |
690 | rxvt_Str_trim(str); |
686 | rxvt_Str_trim(str); |
691 | n = STRLEN(str); |
687 | n = STRLEN(str); |