return (gs != 0);
int (*PR_CALLBACK GIFCallback_EndGIF)( void*    aClientData, int      aAnimationLoopCount),  int (*PR_CALLBACK GIFCallback_BeginImageFrame)( void*    aClientData, PRUint32 aFrameNumber,    PRUint32 aFrameXOffset,   PRUint32 aFrameYOffset,   PRUint32 aFrameWidth, PRUint32 aFrameHeight, GIF_RGB* aTransparencyChromaKey),  int (*PR_CALLBACK GIFCallback_EndImageFrame)( void* aClientData, PRUint32 aFrameNumber, PRUint32 aDelayTimeout, PRUint32 aDisposal),  int (*PR_CALLBACK GIFCallback_SetupColorspaceConverter)(),  int (*PR_CALLBACK GIFCallback_ResetPalette)(),  int (*PR_CALLBACK GIFCallback_InitTransparentPixel)(),  int (*PR_CALLBACK GIFCallback_DestroyTransparentPixel)(),  int (*PR_CALLBACK GIFCallback_HaveDecodedRow)( void* aClientData, PRUint8* aRowBufPtr, int aXOffset, int aLength, int aRow, int aDuplicateCount, PRUint8 aDrawMode, int aInterlacePass),  int (*PR_CALLBACK GIFCallback_HaveImageAll)(void* aClientData) ) { NS_ASSERTION(gs, "Got null argument, will crash!"); if (!gs) return PR_FALSE;  gs->clientptr = aClientData; gs->GIFCallback_NewPixmap = GIFCallback_NewPixmap; gs->GIFCallback_BeginGIF = GIFCallback_BeginGIF; gs->GIFCallback_EndGIF = GIFCallback_EndGIF; gs->GIFCallback_BeginImageFrame = GIFCallback_BeginImageFrame; gs->GIFCallback_EndImageFrame = GIFCallback_EndImageFrame; gs->GIFCallback_SetupColorspaceConverter = GIFCallback_SetupColorspaceConverter; gs->GIFCallback_ResetPalette = GIFCallback_ResetPalette; gs->GIFCallback_InitTransparentPixel = GIFCallback_InitTransparentPixel; gs->GIFCallback_DestroyTransparentPixel = GIFCallback_DestroyTransparentPixel; gs->GIFCallback_HaveDecodedRow = GIFCallback_HaveDecodedRow; gs->GIFCallback_HaveImageAll = GIFCallback_HaveImageAll;  gs->state = gif_init; gs->post_gather_state = gif_error; gs->gathered = 0;  return PR_TRUE;
PRBool GIFInit(    gif_struct* gs,    void* aClientData,    int (*PR_CALLBACK GIFCallback_NewPixmap)(),      int (*PR_CALLBACK GIFCallback_BeginGIF)(        void* aClientData,        PRUint32 aLogicalScreenWidth,         PRUint32 aLogicalScreenHeight,        PRUint8  aBackgroundRGBIndex),        int (*PR_CALLBACK GIFCallback_EndGIF)(        void*    aClientData,        int      aAnimationLoopCount),      int (*PR_CALLBACK GIFCallback_BeginImageFrame)(        void*    aClientData,        PRUint32 aFrameNumber,   /* Frame number, 1-n */        PRUint32 aFrameXOffset,  /* X offset in logical screen */        PRUint32 aFrameYOffset,  /* Y offset in logical screen */        PRUint32 aFrameWidth,            PRUint32 aFrameHeight,           GIF_RGB* aTransparencyChromaKey),      int (*PR_CALLBACK GIFCallback_EndImageFrame)(        void* aClientData,        PRUint32 aFrameNumber,        PRUint32 aDelayTimeout,        PRUint32 aDisposal),      int (*PR_CALLBACK GIFCallback_SetupColorspaceConverter)(),      int (*PR_CALLBACK GIFCallback_ResetPalette)(),      int (*PR_CALLBACK GIFCallback_InitTransparentPixel)(),      int (*PR_CALLBACK GIFCallback_DestroyTransparentPixel)(),      int (*PR_CALLBACK GIFCallback_HaveDecodedRow)(        void* aClientData,        PRUint8* aRowBufPtr,   /* Pointer to single scanline temporary buffer */        int aXOffset,          /* With respect to GIF logical screen origin */        int aLength,           /* Length of the row? */        int aRow,              /* Row number? */        int aDuplicateCount,   /* Number of times to duplicate the row? */        PRUint8 aDrawMode,     /* il_draw_mode */        int aInterlacePass),          int (*PR_CALLBACK GIFCallback_HaveImageAll)(void* aClientData)        )  {    PR_ASSERT(gs);    gs->clientptr = aClientData;    gs->GIFCallback_NewPixmap = GIFCallback_NewPixmap;    gs->GIFCallback_BeginGIF = GIFCallback_BeginGIF;    gs->GIFCallback_EndGIF = GIFCallback_EndGIF;    gs->GIFCallback_BeginImageFrame = GIFCallback_BeginImageFrame;    gs->GIFCallback_EndImageFrame = GIFCallback_EndImageFrame;    gs->GIFCallback_SetupColorspaceConverter = GIFCallback_SetupColorspaceConverter;    gs->GIFCallback_ResetPalette = GIFCallback_ResetPalette;    gs->GIFCallback_InitTransparentPixel = GIFCallback_InitTransparentPixel;    gs->GIFCallback_DestroyTransparentPixel = GIFCallback_DestroyTransparentPixel;    gs->GIFCallback_HaveDecodedRow = GIFCallback_HaveDecodedRow;    gs->GIFCallback_HaveImageAll = GIFCallback_HaveImageAll;      gs->state = gif_init;    gs->post_gather_state = gif_error;    gs->gathered = 0;    return (gs != 0);}