[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linking to ImageMagick by default
From: |
Eli Zaretskii |
Subject: |
Re: Linking to ImageMagick by default |
Date: |
Wed, 19 Dec 2018 18:36:16 +0200 |
> 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.
- Re: Linking to ImageMagick by default, (continued)
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/05
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/08
- Re: Linking to ImageMagick by default, Paul Eggert, 2018/12/08
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/10
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/19
- Re: Linking to ImageMagick by default,
Eli Zaretskii <=
- Re: Linking to ImageMagick by default, Joseph Garvin, 2018/12/19
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/27
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/27
- Re: Linking to ImageMagick by default, Eli Zaretskii, 2018/12/27
- Re: Linking to ImageMagick by default, Juri Linkov, 2018/12/27
- Re: Linking to ImageMagick by default, Eli Zaretskii, 2018/12/28
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/28
- Re: Linking to ImageMagick by default, Eli Zaretskii, 2018/12/29
- Re: Linking to ImageMagick by default, Juri Linkov, 2018/12/29
- Re: Linking to ImageMagick by default, Alan Third, 2018/12/30