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 |
|
|
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) |
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 |
|
|
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 |
|
|
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 |
|
|