comparison src/glyphs-x.c @ 4226:9b4442ac18c7

[xemacs-hg @ 2007-10-15 09:55:43 by didierv] Fix image specifiers related bugs
author didierv
date Mon, 15 Oct 2007 09:55:50 +0000
parents ad2f4ae9895b
children 8475ff9c49ea
comparison
equal deleted inserted replaced
4225:e358b6c40407 4226:9b4442ac18c7
548 548
549 /* Given a pixmap filename, look through all of the "standard" places 549 /* Given a pixmap filename, look through all of the "standard" places
550 where the file might be located. Return a full pathname if found; 550 where the file might be located. Return a full pathname if found;
551 otherwise, return Qnil. */ 551 otherwise, return Qnil. */
552 552
553 /* #### FIXME: when Qnil is returned, the caller can't make a difference
554 #### between a non existing X device, an unreadable file, or an actual
555 #### failure to locate the file, so the issued message is really not
556 #### informative. -- dvl */
553 static Lisp_Object 557 static Lisp_Object
554 x_locate_pixmap_file (Lisp_Object name) 558 x_locate_pixmap_file (Lisp_Object name)
555 { 559 {
556 /* This function can GC if IN_REDISPLAY is false */ 560 /* This function can GC if IN_REDISPLAY is false */
557 Display *display; 561 Display *display;
558 562
559 /* Check non-absolute pathnames with a directory component relative to
560 the search path; that's the way Xt does it. */
561 /* #### Unix-specific */ 563 /* #### Unix-specific */
562 if (string_byte (name, 0) == '/' || 564 if (string_byte (name, 0) == '~' ||
565 string_byte (name, 0) == '/' ||
563 (string_byte (name, 0) == '.' && 566 (string_byte (name, 0) == '.' &&
564 (string_byte (name, 1) == '/' || 567 (string_byte (name, 1) == '/' ||
565 (string_byte (name, 1) == '.' && 568 (string_byte (name, 1) == '.' &&
566 (string_byte (name, 2) == '/'))))) 569 (string_byte (name, 2) == '/')))))
567 { 570 {
569 return Fexpand_file_name (name, Qnil); 572 return Fexpand_file_name (name, Qnil);
570 else 573 else
571 return Qnil; 574 return Qnil;
572 } 575 }
573 576
577 /* Check non-absolute pathnames with a directory component relative to
578 the search path; that's the way Xt does it. */
574 { 579 {
575 Lisp_Object defx = get_default_device (Qx); 580 Lisp_Object defx = get_default_device (Qx);
576 if (NILP (defx)) 581 if (NILP (defx))
577 /* This may occur during initialization. */ 582 /* This may occur during initialization. */
578 return Qnil; 583 return Qnil;