ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvttoolkit.C
(Generate patch)

Comparing rxvt-unicode/src/rxvttoolkit.C (file contents):
Revision 1.59 by root, Wed Jul 5 20:31:48 2006 UTC vs.
Revision 1.60 by root, Wed Jul 5 20:37:31 2006 UTC

313 */ 313 */
314 char *displayResource, *xe; 314 char *displayResource, *xe;
315 XrmDatabase rdb1, database = 0; 315 XrmDatabase rdb1, database = 0;
316 316
317 // for ordering, see for example http://www.faqs.org/faqs/Xt-FAQ/ Subject: 20 317 // for ordering, see for example http://www.faqs.org/faqs/Xt-FAQ/ Subject: 20
318 // as opposed to "standard practise", we always read in ~/.Xdefaults
318 319
319 // 6. System wide per application default file. 320 // 6. System wide per application default file.
320 321
321 /* Add in $XAPPLRESDIR/Rxvt only; not bothering with XUSERFILESEARCHPATH */ 322 /* Add in $XAPPLRESDIR/Rxvt only; not bothering with XUSERFILESEARCHPATH */
322 if ((xe = (char *)getenv ("XAPPLRESDIR"))) 323 if ((xe = (char *)getenv ("XAPPLRESDIR")))
329 330
330 // 5. User's per application default file. 331 // 5. User's per application default file.
331 // none 332 // none
332 333
333 // 4. User's defaults file. 334 // 4. User's defaults file.
335 if (homedir)
336 {
337 snprintf (fname, sizeof (fname), "%s/.Xdefaults", homedir);
338
339 if ((rdb1 = XrmGetFileDatabase (fname)))
340 XrmMergeDatabases (rdb1, &database);
341 }
342
334 /* Get any Xserver defaults */ 343 /* Get any Xserver defaults */
335 if (refresh) 344 if (refresh)
336 { 345 {
337 // fucking xlib keeps a copy of the rm string 346 // fucking xlib keeps a copy of the rm string
338 Atom actual_type; 347 Atom actual_type;
354 && actual_format == 8) 363 && actual_format == 8)
355 displayResource = val; 364 displayResource = val;
356 else 365 else
357 { 366 {
358 displayResource = 0; 367 displayResource = 0;
368
359 if (val) 369 if (val)
360 XFree(val); 370 XFree(val);
361 } 371 }
362 372
363#if XLIB_ILLEGAL_ACCESS 373#if XLIB_ILLEGAL_ACCESS
368 displayResource = XResourceManagerString (dpy); 378 displayResource = XResourceManagerString (dpy);
369 379
370 if (displayResource) 380 if (displayResource)
371 { 381 {
372 if ((rdb1 = XrmGetStringDatabase (displayResource))) 382 if ((rdb1 = XrmGetStringDatabase (displayResource)))
373 XrmMergeDatabases (rdb1, &database);
374 }
375 else if (homedir)
376 {
377 snprintf (fname, sizeof (fname), "%s/.Xdefaults", homedir);
378
379 if ((rdb1 = XrmGetFileDatabase (fname)))
380 XrmMergeDatabases (rdb1, &database); 383 XrmMergeDatabases (rdb1, &database);
381 } 384 }
382 385
383#if !XLIB_ILLEGAL_ACCESS 386#if !XLIB_ILLEGAL_ACCESS
384 if (refresh && displayResource) 387 if (refresh && displayResource)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines