diff options
| author | Andreas Schwab | 2004-06-30 13:11:36 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2004-06-30 13:11:36 +0000 |
| commit | adac86dbb0c8a4d4d1dad2c0eedf166fea6612df (patch) | |
| tree | 9c40fe9272586a0afe85e6d54fd26ea57853c08b /src | |
| parent | f81b59a3d4431b61b17f7ca0107d5b751cf249dc (diff) | |
| download | emacs-adac86dbb0c8a4d4d1dad2c0eedf166fea6612df.tar.gz emacs-adac86dbb0c8a4d4d1dad2c0eedf166fea6612df.zip | |
(CHECK_LIB_AVAILABLE): Add third parameter LIBRARIES.
(Finit_image_library): Pass LIBRARIES through to
CHECK_LIB_AVAILABLE. Declare parameters. Doc fix.
(lookup_image_type): Pass Qnil as second argument to
Finit_image_library.
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/image.c b/src/image.c index 438e132807f..4ab672ca58e 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -675,7 +675,7 @@ define_image_type (type, loaded) | |||
| 675 | success = Qt; | 675 | success = Qt; |
| 676 | } | 676 | } |
| 677 | 677 | ||
| 678 | CACHE_IMAGE_TYPE(*type->type, success); | 678 | CACHE_IMAGE_TYPE (*type->type, success); |
| 679 | return success; | 679 | return success; |
| 680 | } | 680 | } |
| 681 | 681 | ||
| @@ -690,7 +690,7 @@ lookup_image_type (symbol) | |||
| 690 | struct image_type *type; | 690 | struct image_type *type; |
| 691 | 691 | ||
| 692 | /* We must initialize the image-type if it hasn't been already. */ | 692 | /* We must initialize the image-type if it hasn't been already. */ |
| 693 | if (NILP (Finit_image_library (symbol))) | 693 | if (NILP (Finit_image_library (symbol, Qnil))) |
| 694 | return 0; /* unimplemented */ | 694 | return 0; /* unimplemented */ |
| 695 | 695 | ||
| 696 | for (type = image_types; type; type = type->next) | 696 | for (type = image_types; type; type = type->next) |
| @@ -7927,10 +7927,10 @@ DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") | |||
| 7927 | #ifdef HAVE_NTGUI | 7927 | #ifdef HAVE_NTGUI |
| 7928 | /* Image types that rely on external libraries are loaded dynamically | 7928 | /* Image types that rely on external libraries are loaded dynamically |
| 7929 | if the library is available. */ | 7929 | if the library is available. */ |
| 7930 | #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn) \ | 7930 | #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ |
| 7931 | define_image_type (image_type, init_lib_fn (libraries)) | 7931 | define_image_type (image_type, init_lib_fn (libraries)) |
| 7932 | #else | 7932 | #else |
| 7933 | #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn) \ | 7933 | #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ |
| 7934 | define_image_type (image_type, TRUE) | 7934 | define_image_type (image_type, TRUE) |
| 7935 | #endif /* HAVE_NTGUI */ | 7935 | #endif /* HAVE_NTGUI */ |
| 7936 | 7936 | ||
| @@ -7940,8 +7940,9 @@ Return non-nil if TYPE is a supported image type. | |||
| 7940 | 7940 | ||
| 7941 | Image types pbm and xbm are prebuilt; other types are loaded here. | 7941 | Image types pbm and xbm are prebuilt; other types are loaded here. |
| 7942 | Libraries to load are specified in alist LIBRARIES (usually, the value | 7942 | Libraries to load are specified in alist LIBRARIES (usually, the value |
| 7943 | of `image-library-alist', which see. */) | 7943 | of `image-library-alist', which see). */) |
| 7944 | (type, libraries) | 7944 | (type, libraries) |
| 7945 | Lisp_Object type, libraries; | ||
| 7945 | { | 7946 | { |
| 7946 | Lisp_Object tested; | 7947 | Lisp_Object tested; |
| 7947 | 7948 | ||
| @@ -7952,36 +7953,36 @@ of `image-library-alist', which see. */) | |||
| 7952 | 7953 | ||
| 7953 | #if defined (HAVE_XPM) || defined (MAC_OS) | 7954 | #if defined (HAVE_XPM) || defined (MAC_OS) |
| 7954 | if (EQ (type, Qxpm)) | 7955 | if (EQ (type, Qxpm)) |
| 7955 | return CHECK_LIB_AVAILABLE(&xpm_type, init_xpm_functions); | 7956 | return CHECK_LIB_AVAILABLE (&xpm_type, init_xpm_functions, libraries); |
| 7956 | #endif | 7957 | #endif |
| 7957 | 7958 | ||
| 7958 | #if defined (HAVE_JPEG) || defined (MAC_OS) | 7959 | #if defined (HAVE_JPEG) || defined (MAC_OS) |
| 7959 | if (EQ (type, Qjpeg)) | 7960 | if (EQ (type, Qjpeg)) |
| 7960 | return CHECK_LIB_AVAILABLE(&jpeg_type, init_jpeg_functions); | 7961 | return CHECK_LIB_AVAILABLE (&jpeg_type, init_jpeg_functions, libraries); |
| 7961 | #endif | 7962 | #endif |
| 7962 | 7963 | ||
| 7963 | #if defined (HAVE_TIFF) || defined (MAC_OS) | 7964 | #if defined (HAVE_TIFF) || defined (MAC_OS) |
| 7964 | if (EQ (type, Qtiff)) | 7965 | if (EQ (type, Qtiff)) |
| 7965 | return CHECK_LIB_AVAILABLE(&tiff_type, init_tiff_functions); | 7966 | return CHECK_LIB_AVAILABLE (&tiff_type, init_tiff_functions, libraries); |
| 7966 | #endif | 7967 | #endif |
| 7967 | 7968 | ||
| 7968 | #if defined (HAVE_GIF) || defined (MAC_OS) | 7969 | #if defined (HAVE_GIF) || defined (MAC_OS) |
| 7969 | if (EQ (type, Qgif)) | 7970 | if (EQ (type, Qgif)) |
| 7970 | return CHECK_LIB_AVAILABLE(&gif_type, init_gif_functions); | 7971 | return CHECK_LIB_AVAILABLE (&gif_type, init_gif_functions, libraries); |
| 7971 | #endif | 7972 | #endif |
| 7972 | 7973 | ||
| 7973 | #if defined (HAVE_PNG) || defined (MAC_OS) | 7974 | #if defined (HAVE_PNG) || defined (MAC_OS) |
| 7974 | if (EQ (type, Qpng)) | 7975 | if (EQ (type, Qpng)) |
| 7975 | return CHECK_LIB_AVAILABLE(&png_type, init_png_functions); | 7976 | return CHECK_LIB_AVAILABLE (&png_type, init_png_functions, libraries); |
| 7976 | #endif | 7977 | #endif |
| 7977 | 7978 | ||
| 7978 | #ifdef HAVE_GHOSTSCRIPT | 7979 | #ifdef HAVE_GHOSTSCRIPT |
| 7979 | if (EQ (type, Qpostscript)) | 7980 | if (EQ (type, Qpostscript)) |
| 7980 | return CHECK_LIB_AVAILABLE(&gs_type, init_gs_functions); | 7981 | return CHECK_LIB_AVAILABLE (&gs_type, init_gs_functions, libraries); |
| 7981 | #endif | 7982 | #endif |
| 7982 | 7983 | ||
| 7983 | /* If the type is not recognized, avoid testing it ever again. */ | 7984 | /* If the type is not recognized, avoid testing it ever again. */ |
| 7984 | CACHE_IMAGE_TYPE(type, Qnil); | 7985 | CACHE_IMAGE_TYPE (type, Qnil); |
| 7985 | return Qnil; | 7986 | return Qnil; |
| 7986 | } | 7987 | } |
| 7987 | 7988 | ||