--- rxvt-unicode/src/xdefaults.C 2004/03/03 04:07:52 1.15 +++ rxvt-unicode/src/xdefaults.C 2004/03/14 17:33:08 1.17 @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: xdefaults.c *----------------------------------------------------------------------* - * $Id: xdefaults.C,v 1.15 2004/03/03 04:07:52 pcg Exp $ + * $Id: xdefaults.C,v 1.17 2004/03/14 17:33:08 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1994 Robert Nation @@ -242,19 +242,12 @@ #ifdef PRINTPIPE RSTRG (Rs_print_pipe, "print-pipe", "string"), #endif -#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) - RSTRG (Rs_bigfont_key, "bigfont_key", "keysym"), - RSTRG (Rs_smallfont_key, "smallfont_key", "keysym"), -#endif STRG (Rs_modifier, "modifier", "mod", "modifier", "meta modifier = alt|meta|hyper|super|mod1|...|mod5"), INFO ("xrm", "string", "X resource"), #ifdef CUTCHAR_RESOURCE RSTRG (Rs_cutchars, "cutchars", "string"), #endif /* CUTCHAR_RESOURCE */ -#ifdef ACS_ASCII - RSTRG (Rs_acs_chars, "acsChars", "string"), -#endif /* ACS_ASCII */ RSTRG (Rs_answerbackstring, "answerbackString", "string"), INFO ("e", "command arg ...", "command to execute") }; @@ -672,8 +665,8 @@ void rxvt_term::get_xdefaults (FILE *stream, const char *name) { - unsigned int len; - char *str, buffer[256]; + unsigned int len; + char *str, buffer[256]; if (stream == NULL) return; @@ -703,16 +696,34 @@ if (str[n] == ':' && rxvt_Str_match (str, kw)) { /* skip `keyword:' */ - str += (n + 1); + str += n + 1; rxvt_Str_trim (str); n = STRLEN (str); if (n && rs[optList[entry].doff] == NULL) { /* not already set */ - int s; - char *p = (char *)rxvt_malloc ((n + 1) * sizeof (char)); + int s; + char *p = 0; + + for (int o = 0;;) + { + p = (char *)rxvt_realloc (p, o + n + 1); + MEMCPY (p + o, str, n); + o += n; + p[o] = 0; + + if (o == 0 || p[o - 1] != '\\') // continuation line + break; + + o--; // eat "\" + + if ((str = fgets (buffer, sizeof (buffer), stream)) == NULL) + break; + + rxvt_Str_trim (str); + n = STRLEN (str); + } - STRCPY (p, str); rs[optList[entry].doff] = p; if (optList_isBool (entry)) { @@ -962,9 +973,8 @@ # endif # if defined(XAPPLOADDIR) && defined(USE_XAPPLOADDIR) - { - FILE *ad = NULL; + FILE *ad = NULL; # if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) if (localepath == NULL || (ad = fopen (localepath, "r")) == NULL) @@ -995,22 +1005,6 @@ # endif #endif /* NO_RESOURCES */ - - /* - * even without resources, at least do this setup for command-line - * options and command-line long options - */ - -#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) - KeySym sym; - - if (rs[Rs_bigfont_key] - && ((sym = XStringToKeysym (rs[Rs_bigfont_key])) != 0)) - ks_bigfont = sym; - if (rs[Rs_smallfont_key] - && ((sym = XStringToKeysym (rs[Rs_smallfont_key])) != 0)) - ks_smallfont = sym; -#endif } /*}}} */