To initialize the animation system, call the system function initgels(). It takes the form: struct VSprite *vsHead; struct VSprite *vsTail; struct GelsInfo *gInfo; InitGels(vsHead, vsTail, gInfo); The vsHead argument is a pointer to the vsprite structure to be used as the GEL list head. (You must allocate an actual VSprite structure for vsHead to point to.) The vsTail argument is a pointer to the VSprite structure to be used as the GEL list tail. (You must allocate an actual VSprite structure for vsTail to point to.) The gInfo argument is a pointer to the gelsinfo structure to be initialized. initgels() forms these structures into a linked list of gels that is empty except for these two dummy elements (the head and tail). It gives the head vsprite the maximum negative x and y positions and the tail vsprite the maximum positive x and y positions. This is to aid the system in keeping the list sorted by x, y values, so GELs that are closer to the top and left of the display are nearer the head of the list. The memory space that the VSprites and gelsinfo structures take up must already have been allocated. This can be done either by declaring them statically or explicitly allocating memory for them. Once the gelsinfo structure has been allocated and initialized, gels can be added to the system. Refer to the setupgelsys() and cleanupgelsys() functions in the animtools.c lisitng at the end of the chapter for examples of allocating, initializing and freeing a GelsInfo structure.