[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Delayed loading of image libraries
From: |
Andreas Schwab |
Subject: |
Re: [PATCH] Delayed loading of image libraries |
Date: |
Wed, 30 Jun 2004 12:15:29 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Juanma Barranquero <address@hidden> writes:
> +DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2,
> 0,
> + doc: /* Initialize image library implementing image type TYPE.
> +Return non-nil if TYPE is a supported image type.
> +
> +Image types pbm and xbm are prebuilt; other types are loaded here.
> +Libraries to load are specified in alist LIBRARIES (usually, the value
> +of `image-library-alist', which see. */)
> + (type, libraries)
> +{
> + Lisp_Object tested;
> +
> + /* Don't try to reload the library. */
> + tested = Fassq (type, Vimage_type_cache);
> + if (CONSP (tested))
> + return XCDR (tested);
> +
> +#if defined (HAVE_XPM) || defined (MAC_OS)
> + if (EQ (type, Qxpm))
> + return CHECK_LIB_AVAILABLE(&xpm_type, init_xpm_functions);
> +#endif
Please make libraries an explicit parameter of CHECK_LIB_AVAILABLE, so
that it does not look like it is completely ignored. Also, you are
missing to declare the parameters. Please always compile with -Wall.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."