emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking to ImageMagick by default


From: Joseph Garvin
Subject: Re: Linking to ImageMagick by default
Date: Wed, 19 Dec 2018 10:45:45 -0600

What does Mozilla use for Firefox? They should have an even more serious security outlook.

On Wed, Dec 19, 2018, 10:36 AM Eli Zaretskii <address@hidden wrote:
> Date: Wed, 19 Dec 2018 16:03:08 +0000
> From: Alan Third <address@hidden>
>
> I want to strip out the properties that I’m going to use at display
> time, so that I can use the same cached image for different output
> sizes, while leaving other properties that I don’t know about in
> place. So I’d like to store the above as
>
>     '(image :file "image.png" :format png)
>
> however I’m not sure how to go about filtering the list in C. I tried
> a few variations on this, but they all seg fault
>
> static Lisp_Object
> get_cache_spec (Lisp_Object spec)
> {
>   Lisp_Object cache_spec, tail;
>
>   cache_spec = Qnil;
>
>   for (tail = XCDR (spec);
>        CONSP (tail) && CONSP (XCDR (tail));
>        tail = XCDR (XCDR (tail)))
>     {
>       if (!EQ (XCAR (tail), Qwidth)
>           && !EQ (XCAR (tail), QCheight)
>           && !EQ (XCAR (tail), QCmax_width)
>           && !EQ (XCAR (tail), QCmax_height)
>           && !EQ (XCAR (tail), QCscale)
>           && !EQ (XCAR (tail), QCmargin)
>           && !EQ (XCAR (tail), QCascent)
>           && !EQ (XCAR (tail), QCrelief))
>         cache_spec = list3 (XCAR (tail), XCAR (XCDR (tail)), cache_spec);
>     }
>   cache_spec = list2 (XCAR (spec), cache_spec);

I think you should use Fcons instead of list3 or list2.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]