compile troubles with 2.0.0beta1

Chris McCraw (
Mon, 22 Sep 2003 09:45:40 -0500

hi folks,

	i'm scratching my head at a syntax error i get trying to compile 2.0.0
beta1 on a debian linux 3.0 system, using either gcc 3.0.3 or gcc v 3.2.3,
both of which have compiled countless other apps successfully.

the error i get is:

make[1]: Entering directory `/v/filer0/cvsbuild/CVSBUILD/afterstep/libAfterImage'
gcc -O2  -Wall -fPIC -DNO_DEBUG_OUTPUT  -I/usr/local/include/freetype2 -I.. -I/lusr/X11R6/include  -c import.c
import.c: In function `gif2ASImage':
import.c:1361: structure has no member named `Function'
make[1]: *** [import.o] Error 1

(same for both versions of gcc).  what i can't understand is how this
actually works for anyone else..

line 1361 of my import.c:

           if( sp->ExtensionBlocks[y].Function == 0xf9 &&

appears to be asking for the struct member "Function" of a type
ExtensionBlock struct, which is defined in my system's gif_lib.h
(purportedly either version 2.0 or 3.0--the top of the file talks
 about 3.0 but the GIF_LIB_VERSION is defined to " Version 2.0, ") as:

typedef struct {
	    int     ByteCount;
	    char    *Bytes;     /* on malloc(3) heap */
} ExtensionBlock;

now, sp is of type SavedImage which does have a Function member in the
same gif_lib.h:

typedef struct SavedImage {
    GifImageDesc    ImageDesc;                
    char        *RasterBits;        /* on malloc(3) heap */
    int         Function; 
    int         ExtensionBlockCount;
    ExtensionBlock  *ExtensionBlocks;   /* on malloc(3) heap */
} SavedImage;

i know nada about the internals of a gif, gif_lib.h, or indeed afterstep,
so i am loathe to do the obvious and just change line 1361 of AS's import.c
           if( sp.Function == 0xf9 &&

without some clue as to what the intention of the code is.  can anyone

thanks in advance!
The AfterStep Window Manager for X User's Mailing List