BITMAP *bmp = load_gif(filename, 0);
...
draw_sprite(screen, bmp, x, y); /* BITMAP automatically changes with time. */
(Source)
The original code is by Paul Bartrum. My changes are in the public domain. Thanks to Marco Antônio for helping me find my own code...