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

Diff of /emacs/src/image.c

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

revision 1.6.4.2 by miles, Mon Jun 28 07:29:20 2004 UTC revision 1.6.4.3 by miles, Tue Jul 6 02:57:11 2004 UTC
# Line 675  define_image_type (type, loaded) Line 675  define_image_type (type, loaded)
675        success = Qt;        success = Qt;
676      }      }
677    
678    CACHE_IMAGE_TYPE(*type->type, success);    CACHE_IMAGE_TYPE (*type->type, success);
679    return success;    return success;
680  }  }
681    
# Line 690  lookup_image_type (symbol) Line 690  lookup_image_type (symbol)
690    struct image_type *type;    struct image_type *type;
691    
692    /* We must initialize the image-type if it hasn't been already.  */    /* We must initialize the image-type if it hasn't been already.  */
693    if (NILP (Finit_image_library (symbol)))    if (NILP (Finit_image_library (symbol, Qnil)))
694      return 0;                   /* unimplemented */      return 0;                   /* unimplemented */
695    
696    for (type = image_types; type; type = type->next)    for (type = image_types; type; type = type->next)
# Line 7927  DEFUN ("lookup-image", Flookup_image, Sl Line 7927  DEFUN ("lookup-image", Flookup_image, Sl
7927  #ifdef HAVE_NTGUI  #ifdef HAVE_NTGUI
7928  /* Image types that rely on external libraries are loaded dynamically  /* Image types that rely on external libraries are loaded dynamically
7929     if the library is available.  */     if the library is available.  */
7930  #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn) \  #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \
7931    define_image_type (image_type, init_lib_fn (libraries))    define_image_type (image_type, init_lib_fn (libraries))
7932  #else  #else
7933  #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn) \  #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \
7934    define_image_type (image_type, TRUE)    define_image_type (image_type, TRUE)
7935  #endif /* HAVE_NTGUI */  #endif /* HAVE_NTGUI */
7936    
# Line 7940  Return non-nil if TYPE is a supported im Line 7940  Return non-nil if TYPE is a supported im
7940    
7941  Image types pbm and xbm are prebuilt; other types are loaded here.  Image types pbm and xbm are prebuilt; other types are loaded here.
7942  Libraries to load are specified in alist LIBRARIES (usually, the value  Libraries to load are specified in alist LIBRARIES (usually, the value
7943  of `image-library-alist', which see.  */)  of `image-library-alist', which see).  */)
7944    (type, libraries)    (type, libraries)
7945      Lisp_Object type, libraries;
7946  {  {
7947    Lisp_Object tested;    Lisp_Object tested;
7948    
# Line 7952  of `image-library-alist', which see.  */ Line 7953  of `image-library-alist', which see.  */
7953    
7954  #if defined (HAVE_XPM) || defined (MAC_OS)  #if defined (HAVE_XPM) || defined (MAC_OS)
7955    if (EQ (type, Qxpm))    if (EQ (type, Qxpm))
7956      return CHECK_LIB_AVAILABLE(&xpm_type, init_xpm_functions);      return CHECK_LIB_AVAILABLE (&xpm_type, init_xpm_functions, libraries);
7957  #endif  #endif
7958    
7959  #if defined (HAVE_JPEG) || defined (MAC_OS)  #if defined (HAVE_JPEG) || defined (MAC_OS)
7960    if (EQ (type, Qjpeg))    if (EQ (type, Qjpeg))
7961      return CHECK_LIB_AVAILABLE(&jpeg_type, init_jpeg_functions);      return CHECK_LIB_AVAILABLE (&jpeg_type, init_jpeg_functions, libraries);
7962  #endif  #endif
7963    
7964  #if defined (HAVE_TIFF) || defined (MAC_OS)  #if defined (HAVE_TIFF) || defined (MAC_OS)
7965    if (EQ (type, Qtiff))    if (EQ (type, Qtiff))
7966      return CHECK_LIB_AVAILABLE(&tiff_type, init_tiff_functions);      return CHECK_LIB_AVAILABLE (&tiff_type, init_tiff_functions, libraries);
7967  #endif  #endif
7968    
7969  #if defined (HAVE_GIF) || defined (MAC_OS)  #if defined (HAVE_GIF) || defined (MAC_OS)
7970    if (EQ (type, Qgif))    if (EQ (type, Qgif))
7971      return CHECK_LIB_AVAILABLE(&gif_type, init_gif_functions);      return CHECK_LIB_AVAILABLE (&gif_type, init_gif_functions, libraries);
7972  #endif  #endif
7973    
7974  #if defined (HAVE_PNG) || defined (MAC_OS)  #if defined (HAVE_PNG) || defined (MAC_OS)
7975    if (EQ (type, Qpng))    if (EQ (type, Qpng))
7976      return CHECK_LIB_AVAILABLE(&png_type, init_png_functions);      return CHECK_LIB_AVAILABLE (&png_type, init_png_functions, libraries);
7977  #endif  #endif
7978    
7979  #ifdef HAVE_GHOSTSCRIPT  #ifdef HAVE_GHOSTSCRIPT
7980    if (EQ (type, Qpostscript))    if (EQ (type, Qpostscript))
7981      return CHECK_LIB_AVAILABLE(&gs_type, init_gs_functions);      return CHECK_LIB_AVAILABLE (&gs_type, init_gs_functions, libraries);
7982  #endif  #endif
7983    
7984    /* If the type is not recognized, avoid testing it ever again.  */    /* If the type is not recognized, avoid testing it ever again.  */
7985    CACHE_IMAGE_TYPE(type, Qnil);    CACHE_IMAGE_TYPE (type, Qnil);
7986    return Qnil;    return Qnil;
7987  }  }
7988    

Legend:
Removed from v.1.6.4.2  
changed lines
  Added in v.1.6.4.3

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