/[emacs]/emacs/src/w32term.c
ViewVC logotype

Diff of /emacs/src/w32term.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.177 by jasonr, Wed Jan 22 23:04:05 2003 UTC revision 1.178 by lektu, Thu Mar 6 13:00:04 2003 UTC
# Line 11134  w32_initialize_display_info (display_nam Line 11134  w32_initialize_display_info (display_nam
11134    
11135  }  }
11136    
11137    /* Create an xrdb-style database of resources to supercede registry settings.
11138       The database is just a concatenation of C strings, finished by an additional
11139       \0.  The string are submitted to some basic normalization, so
11140    
11141         [ *]option[ *]:[ *]value...
11142    
11143       becomes
11144    
11145         option:value...
11146    
11147       but any whitespace following value is not removed.  */
11148    
11149    static char *
11150    w32_make_rdb (xrm_option)
11151         char *xrm_option;
11152    {
11153      char *buffer = xmalloc (strlen (xrm_option) + 2);
11154      char *current = buffer;
11155      char ch;
11156      int in_option = 1;
11157      int before_value = 0;
11158    
11159      do {
11160        ch = *xrm_option++;
11161    
11162        if (ch == '\n')
11163          {
11164            *current++ = '\0';
11165            in_option = 1;
11166            before_value = 0;
11167          }
11168        else if (ch != ' ')
11169          {
11170            *current++ = ch;
11171            if (in_option && (ch == ':'))
11172              {
11173                in_option = 0;
11174                before_value = 1;
11175              }
11176            else if (before_value)
11177              {
11178                before_value = 0;
11179              }
11180          }
11181        else if (!(in_option || before_value))
11182          {
11183            *current++ = ch;
11184          }
11185      } while (ch);
11186    
11187      *current = '\0';
11188    
11189      return buffer;
11190    }
11191    
11192  struct w32_display_info *  struct w32_display_info *
11193  w32_term_init (display_name, xrm_option, resource_name)  w32_term_init (display_name, xrm_option, resource_name)
11194       Lisp_Object display_name;       Lisp_Object display_name;
# Line 11151  w32_term_init (display_name, xrm_option, Line 11206  w32_term_init (display_name, xrm_option,
11206        w32_initialized = 1;        w32_initialized = 1;
11207      }      }
11208    
   {  
     int argc = 0;  
     char *argv[3];  
   
     argv[0] = "";  
     argc = 1;  
     if (xrm_option)  
       {  
         argv[argc++] = "-xrm";  
         argv[argc++] = xrm_option;  
       }  
   }  
   
11209    w32_initialize_display_info (display_name);    w32_initialize_display_info (display_name);
11210    
11211    dpyinfo = &one_w32_display_info;    dpyinfo = &one_w32_display_info;
11212    
11213      dpyinfo->xrdb = xrm_option ? w32_make_rdb (xrm_option) : NULL;
11214    
11215    /* Put this display on the chain.  */    /* Put this display on the chain.  */
11216    dpyinfo->next = x_display_list;    dpyinfo->next = x_display_list;
11217    x_display_list = dpyinfo;    x_display_list = dpyinfo;

Legend:
Removed from v.1.177  
changed lines
  Added in v.1.178

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26