*** empty log message ***
authorpcg <pcg>
Thu, 4 Mar 2004 00:59:10 +0000 (00:59 +0000)
committerpcg <pcg>
Thu, 4 Mar 2004 00:59:10 +0000 (00:59 +0000)
src/defaultfont.C
src/xdefaults.C

index e425eae6c3d8d167304f0676e80f6800de5a0e07..2a1ba974d0ce33b582ff94fd2628a1f4f651ec88 100644 (file)
@@ -1099,6 +1099,7 @@ bool
 rxvt_fontset::populate (const char *desc)
 {
   clear ();
+  printf ("P(%s)\n",desc);
 
   fonts.push_back (new_font (0, CS_UNICODE));
   realize_font (0);
index 7d6940ca2290f6c481443e859bd2d3c2c0416428..d3d7e6f991e5bc50bd7b8f305885663d36620d3e 100644 (file)
@@ -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.16 2004-03-04 00:59:10 pcg Exp $
  *
  * All portions of code are copyright by their respective author/s.
  * Copyright (c) 1994      Robert Nation <nation@rocket.sanders.lockheed.com>
@@ -672,8 +672,8 @@ rxvt_term::parse_keysym (const char *str, const char *arg)
 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 +703,34 @@ rxvt_term::get_xdefaults (FILE *stream, const char *name)
             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))
                       {