#include #include #include #include #include #include #define WIDTH 89 #define HEIGHT 112 #define MAXPIXEL 9968 #define RED 0 #define GREEN 1 #define BLUE 2 static int clist[2] = {15,0}; static int colors[96] = {0,255,0,255,255,255,0,0,0,0,0,148,0,0,198,0,0,255,0,8,49,0,8,247,0,107,90,0,132,99,0,148,115,0,156,123,0,181,148,0,198,148,0,206,173,16,33,41,24,16,0,66,57,107,90,181,165,99,82,0,107,74,57,148,74,41,165,90,57,181,123,49,189,156,156,239,231,0,255,214,132,255,214,173,255,255,247,0,0,0,0,0,0,0,0,0}; static int frames[0][9968] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,22,23,27,27,26,26,23,19,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,23,28,28,28,28,28,28,28,28,28,26,19,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,19,26,28,28,28,28,28,28,28,28,28,28,28,28,25,19,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,19,16,23,26,28,28,28,28,28,28,28,28,28,28,28,26,26,28,25,25,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19,19,23,26,28,28,26,26,26,25,25,25,25,26,26,26,26,25,25,26,25,25,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,25,19,25,28,28,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,19,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19,25,25,25,26,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,19,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,25,25,25,25,25,25,25,25,25,25,25,19,19,16,16,19,19,25,25,25,25,25,25,25,25,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19,25,25,25,25,25,25,25,25,19,16,2,2,2,2,2,16,19,19,25,25,25,25,25,25,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,16,25,25,25,25,25,25,19,16,16,16,20,20,16,2,2,16,25,25,25,25,25,25,25,25,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,16,21,22,19,19,25,25,25,25,25,19,16,20,20,20,21,20,20,24,20,2,19,25,25,25,25,25,25,19,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,24,20,23,21,19,25,25,25,25,19,16,20,21,22,22,22,20,24,24,27,22,16,25,25,25,25,25,19,16,19,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,23,24,16,22,25,25,19,19,19,23,20,20,23,23,23,23,22,27,22,20,27,20,16,25,19,16,16,16,16,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,22,20,20,25,19,16,16,16,24,24,21,23,24,24,24,24,24,20,22,20,27,16,19,16,16,16,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,16,25,23,19,16,20,20,15,22,27,23,24,24,24,23,24,20,23,24,20,24,21,25,25,25,25,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,25,25,19,16,24,20,24,22,22,24,24,24,24,23,22,22,24,24,24,20,19,25,19,25,25,19,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,25,25,25,25,19,22,22,24,27,20,23,24,23,23,23,22,22,24,24,23,16,16,25,25,19,19,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19,25,25,25,25,23,20,23,24,27,24,20,24,23,23,23,20,22,22,20,20,16,19,25,25,25,19,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,25,25,25,25,19,19,16,15,20,20,22,20,22,23,23,23,20,15,15,28,28,22,16,25,25,25,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19,25,25,25,25,19,16,16,24,28,17,15,16,21,20,20,20,17,24,28,27,27,27,16,25,25,25,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,25,25,25,25,19,23,24,24,28,28,23,16,16,16,16,16,24,24,24,24,24,27,20,25,19,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,25,25,25,25,20,27,27,27,27,27,23,20,16,21,21,20,24,16,20,23,23,20,25,19,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,16,25,19,25,19,23,27,24,22,16,16,24,27,23,23,27,24,20,24,23,19,25,16,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,15,2,2,2,16,2,19,19,16,16,20,23,24,24,23,24,23,22,24,20,20,19,19,25,25,19,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,15,24,24,20,24,15,2,2,2,2,2,16,20,20,2,2,20,20,20,20,16,20,20,16,15,16,19,25,25,19,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,15,24,28,28,28,24,16,17,20,24,24,24,24,20,20,24,24,16,20,24,22,22,23,16,24,24,16,19,25,25,2,2,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,16,20,22,22,22,20,28,28,28,28,15,28,28,28,28,24,24,28,28,28,17,2,24,24,24,24,24,20,17,28,20,16,15,19,16,2,2,2,2,15,16,15,15,15,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,24,24,24,23,23,20,24,28,28,28,15,24,28,28,24,24,28,28,28,20,16,16,23,27,24,24,27,23,2,24,28,17,24,24,20,17,17,17,17,20,24,17,20,28,17,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,23,24,24,22,20,22,21,20,28,24,28,20,24,28,24,28,28,28,28,28,16,20,23,24,24,27,27,27,24,16,17,28,28,20,24,28,28,28,28,28,17,24,28,28,24,20,16,16,16,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,23,23,23,24,20,20,20,15,24,24,24,15,24,24,24,28,28,28,28,20,15,27,27,27,27,27,27,27,24,20,16,24,28,24,20,28,28,28,28,28,24,24,28,20,20,22,24,24,24,22,16,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,23,23,23,23,24,16,16,16,24,28,24,15,24,24,24,20,24,28,24,15,15,24,27,27,27,27,27,27,27,27,24,20,28,28,24,20,28,28,24,28,24,17,20,22,24,23,23,23,23,23,22,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,23,23,23,23,24,20,16,16,24,24,24,15,24,17,15,17,17,24,15,14,12,23,27,27,24,22,24,27,27,27,27,20,28,28,28,24,20,20,24,24,20,20,23,23,23,23,23,23,23,23,23,16,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,23,23,23,23,23,20,2,16,24,24,20,17,24,20,15,15,17,6,13,14,18,18,24,27,27,24,20,24,24,27,27,24,24,28,28,28,16,17,24,22,22,23,23,23,23,23,23,23,23,22,16,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,23,23,23,23,23,20,2,15,24,20,20,16,15,20,28,28,20,9,14,14,18,18,20,24,27,24,20,20,24,27,27,24,15,28,24,15,17,17,15,22,23,23,23,23,23,23,22,22,21,16,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,23,23,23,23,23,20,15,24,17,20,15,20,19,24,28,28,15,13,14,14,18,18,18,17,24,27,16,22,27,27,27,24,11,17,15,17,15,20,23,23,23,23,23,22,22,21,20,16,2,2,2,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,22,23,23,23,23,20,16,20,16,15,2,20,19,22,28,28,15,14,14,14,18,18,18,18,20,27,16,24,27,24,24,18,18,8,28,20,16,23,23,23,21,20,16,16,16,2,2,2,2,20,20,20,20,20,20,20,20,20,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,23,23,23,23,16,2,2,2,2,2,2,16,19,24,28,15,14,14,14,14,18,18,14,10,20,20,22,20,8,14,18,18,9,24,16,22,23,22,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,23,23,23,23,16,2,0,0,0,0,2,2,16,19,28,20,10,14,14,14,14,14,14,14,15,15,8,11,14,14,18,18,10,15,20,23,22,16,2,2,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,2,2,2,2,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,22,23,23,23,16,2,0,0,0,0,0,2,2,19,24,24,6,12,14,14,14,14,14,14,11,9,12,12,14,14,14,14,9,2,22,23,20,2,2,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,21,23,23,22,2,2,0,0,0,0,0,2,15,19,20,24,16,6,11,14,14,14,14,11,9,15,8,11,14,14,14,14,6,16,22,23,21,2,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,2,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,22,23,21,2,0,0,0,0,0,0,2,16,17,15,24,20,6,15,8,9,11,9,8,8,9,10,12,12,12,12,6,2,20,21,23,23,2,2,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,2,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,21,22,20,2,0,0,0,2,2,2,2,2,2,2,20,20,9,10,9,9,10,11,11,11,10,8,8,9,8,6,15,16,20,21,22,23,16,2,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,2,2,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,21,21,20,2,2,2,2,16,17,15,15,20,20,20,15,15,9,12,12,12,11,10,10,11,11,9,6,2,2,16,20,16,21,21,22,23,16,2,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,20,21,20,16,16,16,20,20,16,17,15,20,28,24,15,15,10,11,9,8,8,15,15,9,11,6,2,16,16,15,20,16,22,21,22,23,16,2,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,2,0,2,2,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,21,21,23,23,23,23,22,21,15,24,17,28,28,17,6,10,8,8,9,10,10,10,8,6,16,15,16,15,17,20,16,20,20,21,23,16,2,2,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,2,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,21,23,23,23,23,23,23,22,16,24,24,24,28,17,15,9,9,11,11,11,10,2,2,16,20,17,16,17,24,24,15,16,16,20,20,22,21,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,2,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,21,22,23,23,23,20,22,16,15,24,28,24,16,15,10,11,11,11,12,11,16,17,17,20,17,15,20,24,24,17,2,16,16,16,16,20,16,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,2,0,0,2,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,6,16,19,20,20,22,22,16,20,16,24,24,24,15,15,11,12,11,11,12,9,15,17,20,20,17,15,17,24,24,17,2,2,16,16,16,16,16,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,16,6,4,4,3,6,6,16,21,16,16,2,17,24,20,15,15,11,12,11,12,12,8,20,20,20,20,20,15,20,24,24,17,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,16,21,16,3,4,5,5,5,5,4,6,20,2,6,2,20,20,15,8,12,12,11,12,14,15,17,20,20,20,17,15,24,24,24,15,2,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,20,23,20,2,4,5,5,5,5,5,5,5,16,2,3,3,6,15,6,8,11,12,12,12,9,15,17,20,20,20,17,15,24,24,24,15,2,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,2,2,16,23,24,24,22,6,4,5,5,5,5,5,5,5,3,2,3,3,4,3,4,3,6,15,8,6,16,17,20,20,20,20,20,20,24,24,24,15,2,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,2,2,16,23,24,24,27,22,6,5,5,5,5,5,5,5,5,5,6,3,4,4,4,4,4,4,3,3,6,6,17,20,20,20,20,15,20,24,24,24,15,2,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,2,2,2,0,0,0, 0,0,0,0,0,0,0,0,0,0,2,2,16,24,22,24,27,27,20,3,5,5,5,5,5,7,7,5,5,3,6,3,4,4,4,4,3,3,4,5,3,15,20,20,20,20,15,24,24,24,24,16,2,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,2,2,0, 0,0,0,0,0,0,0,0,0,2,2,16,24,23,24,27,27,27,16,3,5,5,5,7,7,7,7,7,5,4,2,3,3,4,4,3,2,3,5,7,7,16,20,20,24,17,15,24,24,24,24,16,2,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,2,2,0,0,0, 0,0,0,0,0,0,0,0,2,2,16,23,22,23,27,27,27,24,16,3,5,5,5,5,7,7,7,7,7,5,6,6,3,3,6,2,3,5,5,7,7,6,2,15,17,15,17,24,24,24,24,2,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,2,2,0, 0,0,0,0,0,0,0,0,2,16,23,23,22,27,27,27,27,24,16,3,4,5,5,5,7,7,7,7,7,5,3,2,3,6,2,3,4,5,5,5,7,3,2,2,2,2,17,24,24,24,24,2,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,2,2,2,0,0,0, 0,0,0,0,0,0,0,2,2,23,24,22,27,27,27,27,27,24,16,3,4,5,5,5,7,7,7,7,7,5,5,2,6,2,3,4,4,4,5,5,7,7,2,2,28,2,17,24,24,24,24,2,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,2,2,21,24,22,24,27,27,27,27,27,24,16,3,4,5,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,0,0, 0,0,0,2,16,23,23,22,27,27,27,27,27,27,27,27,27,27,27,20,6,4,4,5,5,5,5,7,7,7,5,3,2,3,4,4,4,4,4,4,5,5,7,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,2,2,2,2,0, 0,0,0,2,20,23,21,20,27,27,27,27,27,27,27,27,27,27,27,24,2,4,4,4,5,5,5,5,7,7,5,3,2,3,3,4,4,4,4,4,5,5,7,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2,2,23,23,16,22,27,27,27,27,27,27,27,27,27,27,27,24,16,3,4,4,5,5,5,5,5,5,5,3,2,3,3,4,4,4,4,4,4,5,7,4,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,2,16,23,23,16,24,27,27,27,27,27,27,27,27,27,27,27,27,23,2,4,4,5,5,5,5,5,5,5,3,2,2,3,3,4,4,4,4,4,5,7,7,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,2,16,23,23,21,27,27,27,27,27,27,27,27,27,27,27,27,27,27,16,6,4,4,5,5,5,5,5,5,6,2,2,6,3,4,4,4,4,4,5,7,7,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,2,2,2,2,0, 0,0,2,20,23,22,22,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,16,3,4,5,5,5,5,5,5,6,2,2,2,6,3,4,4,4,4,5,7,7,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2,21,23,22,22,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,22,6,4,5,5,5,5,5,5,2,2,2,2,2,6,4,4,4,4,5,7,7,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,0,0,0,2,0, 0,0,16,21,22,22,23,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,24,16,3,4,5,5,5,5,4,2,2,2,2,2,2,3,4,4,4,5,7,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,2,0,0,2,0, 0,0,16,21,21,21,23,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,24,2,4,5,5,5,5,4,2,4,4,4,4,3,6,4,4,4,5,7,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,2,0,0,2,0, 0,0,2,21,21,21,24,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,24,16,3,5,5,5,5,6,4,4,4,4,4,3,3,4,4,4,5,7,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,2,2,2,2,2,0, 0,0,2,20,21,21,23,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,24,20,2,4,4,4,3,6,6,4,4,4,4,4,4,4,4,4,5,7,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2,20,21,21,21,24,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,24,20,6,4,3,6,4,7,6,4,4,4,4,4,3,4,4,4,4,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2,16,21,21,20,23,27,27,27,27,27,27,27,27,27,27,27,27,27,27,24,24,16,3,4,4,5,5,7,6,3,4,4,4,4,3,3,4,3,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2,2,21,21,21,20,24,24,27,27,27,27,27,27,27,27,27,27,27,27,24,23,6,4,4,5,5,5,7,7,2,4,4,4,3,3,3,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,2,0,0,0,0,0, 0,0,0,2,20,21,21,20,23,24,24,27,27,27,27,27,27,27,27,27,27,27,24,20,6,4,4,5,5,5,7,7,2,3,4,3,3,3,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,2,2,0,0,0, 0,0,0,2,16,21,21,21,20,24,24,24,27,27,27,27,27,27,27,27,27,27,24,15,3,4,4,5,5,5,7,7,2,3,3,3,6,2,22,20,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,0,0,2,2,0, 0,0,0,2,2,16,22,21,21,20,22,24,24,24,24,27,27,27,27,27,27,27,24,16,3,4,4,5,5,5,7,7,6,6,3,6,16,24,27,27,23,16,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,0,0,0,0,0, 0,0,0,0,2,2,20,21,21,20,16,22,24,24,24,24,24,24,27,27,27,27,24,16,3,4,4,5,5,5,7,7,6,6,6,15,24,27,27,27,27,24,16,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,2,2,21,22,21,21,16,22,24,24,24,24,24,24,24,24,24,24,16,3,4,4,5,5,5,7,7,6,2,20,27,27,27,27,27,27,27,24,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,2,2,2,2,0,0, 0,0,0,0,0,0,2,16,20,21,21,21,20,20,23,24,24,24,24,24,24,24,24,16,3,4,4,5,5,5,7,7,2,22,27,27,27,27,27,27,27,27,27,23,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,0,2,0,2,0, 0,0,0,0,0,0,2,2,16,20,22,21,21,20,20,20,23,24,24,24,24,24,24,16,6,4,4,5,5,5,7,7,16,27,27,27,27,27,27,27,27,27,27,27,15,2,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,0,2,0,2,0, 0,0,0,0,0,0,0,2,2,2,16,20,21,22,21,21,20,16,16,16,16,16,16,16,2,4,4,5,5,5,7,3,20,24,24,24,24,27,27,27,27,27,27,27,24,2,2,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,2,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,2,2,16,16,20,21,21,16,16,20,16,16,16,20,21,2,3,4,4,5,5,7,6,20,24,24,24,24,24,27,27,27,27,27,27,27,16,2,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,2,2,2,16,16,20,23,23,23,23,21,23,22,2,6,4,4,5,5,7,6,20,20,20,20,22,24,24,24,27,27,27,27,27,20,2,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,2,2,2,2,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,20,23,23,23,23,23,23,22,16,2,4,4,5,5,7,16,21,22,21,20,20,20,20,23,24,27,27,27,27,22,2,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,0,2,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,23,23,23,23,23,23,22,16,2,3,4,5,5,7,16,16,20,20,20,21,22,20,16,22,24,27,27,27,23,2,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,2,0,0,2,0,2,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,22,23,23,23,23,22,16,2,2,2,4,4,5,7,2,2,2,2,2,16,16,20,21,20,20,24,27,27,23,2,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,2,2,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,20,23,23,23,23,16,2,2,2,6,6,3,5,4,2,0,0,0,0,2,2,2,2,16,20,20,27,27,22,2,0,0,0,0,0,0,0,0,0,0,0,0,20,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,16,23,23,23,19,2,2,0,2,4,4,6,3,3,2,2,0,0,0,0,0,0,2,2,2,16,22,27,20,2,0,0,0,0,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,1,0, 0,0,1,1,1,0,0, 0,1,0,0,0,1,0, 0,1,0,0,0,1,0, 0,1,0,0,0,1,0, 0,0,1,1,1,0,0}, {0,0,0,0,0,0,0, 0,0,1,1,1,0,0, 0,1,0,0,0,1,0, 0,1,0,0,0,1,0, 0,1,0,0,0,1,0, 0,0,1,1,1,1,0, 0,0,0,0,0,1,0, 0,1,0,0,0,1,0, 0,0,1,1,1,0,0}, }; static int colormap[112][3] = { {255,255,255},{230,230,230},{222,222,222},{205,205,205},{180,180,180},{164,164,164},{156,156,156},{131,131,131}, {115,115,115},{98,98,98},{82,82,82},{65,65,65},{49,49,49},{32,32,32},{24,24,24},{0,0,0}, {255,0,0},{255,246,16},{82,255,24},{0,255,255},{0,41,255},{238,32,255},{205,172,139},{148,115,98}, {98,82,65},{65,49,41},{41,24,24},{205,148,90},{164,106,57},{131,82,41},{106,57,24},{74,41,16}, {255,139,98},{255,164,106},{255,197,123},{255,246,139},{205,222,139},{164,205,139},{123,189,139},{106,197,189}, {82,197,238},{98,148,197},{115,139,180},{115,106,164},{148,115,172},{180,123,172},{246,139,172},{255,139,139}, {246,82,57},{255,123,65},{255,164,74},{255,246,82},{172,205,90},{115,180,90},{49,164,98},{0,172,164}, {0,180,238},{16,123,180},{49,90,156},{65,57,131},{115,65,139},{156,74,139},{238,82,139},{246,82,98}, {230,0,41},{246,74,24},{255,131,8},{255,246,16},{131,189,32},{49,164,49},{24,139,82},{0,148,139}, {0,172,230},{0,90,164},{0,49,131},{0,16,98},{65,16,98},{123,16,106},{230,8,106},{230,0,74}, {139,0,24},{148,41,8},{156,82,8},{172,148,8},{82,115,16},{24,98,24},{16,90,49},{0,90,82}, {0,98,139},{0,57,98},{0,32,65},{0,8,57},{41,8,57},{74,8,57},{139,8,65},{139,0,41}, {98,0,16},{98,32,8},{106,49,0},{115,98,8},{49,74,8},{16,65,16},{8,57,32},{0,57,57}, {0,65,90},{0,32,65},{0,16,49},{0,0,41},{24,0,41},{49,0,41},{90,0,41},{98,0,16} }; static int a_count; int curr_frame; typedef int code_int; typedef long int count_int; static long pixel_index; #define BITS 12 #define HSIZE 5003 typedef char char_type; static int n_bits; static int maxbits = BITS; static code_int maxcode; static code_int maxmaxcode = (code_int)1 << BITS; # define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1) static count_int htab [HSIZE]; static unsigned short codetab [HSIZE]; #define HashTabOf(i) htab[i] #define CodeTabOf(i) codetab[i] static code_int hsize = HSIZE; #define tab_prefixof(i) CodeTabOf(i) #define tab_suffixof(i) ((char_type*)(htab))[i] #define de_stack ((char_type*)&tab_suffixof((code_int)1< 0 ) { fputc( a_count, stdout ); fwrite( accum, 1, a_count, stdout ); a_count = 0; } } static void char_init() { a_count = 0; } static void char_out( c ) int c; { accum[ a_count++ ] = c; if( a_count >= 254 ) flush_char(); } void output( code ) code_int code; { cur_accum &= masks[ cur_bits ]; if( cur_bits > 0 ) cur_accum |= ((long)code << cur_bits); else cur_accum = code; cur_bits += n_bits; while( cur_bits >= 8 ) { char_out( (unsigned int)(cur_accum & 0xff) ); cur_accum >>= 8; cur_bits -= 8; } if ( free_ent > maxcode || clear_flg ) { if( clear_flg ) { maxcode = MAXCODE (n_bits = g_init_bits); clear_flg = 0; } else { ++n_bits; if ( n_bits == maxbits ) maxcode = maxmaxcode; else maxcode = MAXCODE(n_bits); } } if( code == EOFCode ) { while( cur_bits > 0 ) { char_out( (unsigned int)(cur_accum & 0xff) ); cur_accum >>= 8; cur_bits -= 8; } flush_char(); fflush( stdout ); } } static void cl_hash(hsize) /* reset code table */ register count_int hsize; { register count_int *htab_p = htab+hsize; register long i; register long m1 = -1; i = hsize - 16; do { /* might use Sys V memset(3) here */ *(htab_p-16) = m1; *(htab_p-15) = m1; *(htab_p-12) = m1; *(htab_p-13) = m1; *(htab_p-12) = m1; *(htab_p-11) = m1; *(htab_p-10) = m1; *(htab_p-9) = m1; *(htab_p-8) = m1; *(htab_p-7) = m1; *(htab_p-6) = m1; *(htab_p-5) = m1; *(htab_p-4) = m1; *(htab_p-3) = m1; *(htab_p-2) = m1; *(htab_p-1) = m1; htab_p -= 16; } while ((i -= 16) >= 0); for ( i += 16; i > 0; --i ) *--htab_p = m1; } static void cl_block () /* table clear for block compress */ { cl_hash ( (count_int) hsize ); free_ent = ClearCode + 2; clear_flg = 1; output( (code_int)ClearCode ); } static void compress( init_bits, frame_num ) int init_bits; int frame_num; { register long fcode; register code_int i /* = 0 */; register int c; register code_int ent; register code_int disp; register code_int hsize_reg; register int hshift; long int q; long int m; m = -1; for(q = 0; q < HSIZE; q++) { htab[q] = m; codetab[q] = 0; } curr_frame = frame_num; in_count = 1; out_count = 0; cur_bits = 0; cur_accum = 0; sprintf(accum,""); pixel_index = -1; g_init_bits = init_bits; offset = 0; out_count = 0; clear_flg = 0; in_count = 1; maxcode = MAXCODE(n_bits = g_init_bits); ClearCode = (1 << (init_bits - 1)); EOFCode = ClearCode + 1; free_ent = ClearCode + 2; char_init(); cl_block(); ent = GIFNextPixel(frame_num); hshift = 0; for ( fcode = (long) hsize; fcode < 65536L; fcode *= 2L ) ++hshift; hshift = 8 - hshift; /* set hash code range bound */ hsize_reg = hsize; cl_hash( (count_int)hsize_reg); /* clear hash table */ output( (code_int)ClearCode ); while ( (c = GIFNextPixel(frame_num)) != EOF ) { ++in_count; fcode = (long) (((long) c << maxbits) + ent); i = (((code_int)c << hshift) ^ ent); /* xor hashing */ if ( HashTabOf (i) == fcode ) { ent = CodeTabOf (i); continue; } else if ( (long)HashTabOf (i) < 0 ) /* empty slot */ goto nomatch; disp = hsize_reg - i; /* secondary hash (after G. Knott) */ if ( i == 0 ) disp = 1; probe: if ( (i -= disp) < 0 ) i += hsize_reg; if ( HashTabOf (i) == fcode ) { ent = CodeTabOf (i); continue; } if ( (long)HashTabOf (i) > 0 ) goto probe; nomatch: output ( (code_int) ent ); ++out_count; ent = c; if ( free_ent < maxmaxcode ) { CodeTabOf (i) = free_ent++; /* code -> hashtable */ HashTabOf (i) = fcode; } else cl_block(); } /* * Put out the final code. */ output( (code_int)ent ); ++out_count; output( (code_int)EOFCode ); } main(argc,argv) int argc; char *argv[]; { static char s[256] = ""; static char count[10] = "0"; static char option[80] = "none"; static char url[512] = ""; static char dchar[1] = ""; char *token; FILE *fp; FILE *catout; long i; long x; int y; int z; int q; int mon; int row; int col; int countpos = 0; int border = 1; struct tm when; time_t now; time(&now); if(getenv("PATH_INFO") != NULL) { strcpy(s,getenv("PATH_INFO")+1); } else { strcpy(s,argv[1]); } if(strpbrk(s,"=") != NULL) { token = strtok(s,"="); strcpy(count,token); token = strtok(NULL,"="); clist[1] = atoi(token); } /* Build palette */ for(q=0; q < 2; q++) { i = clist[q]; x = q*3; colors[x] = colormap[i][RED]; colors[x+1] = colormap[i][GREEN]; colors[x+2] = colormap[i][BLUE]; } i = strlen(count); x = 64; y = 74 - (i*5); for(i = 0; i < strlen(count); i++) { sprintf(dchar,"%c",count[i]); z = atoi(dchar); for(row = 0; row < 9; row++) { for(col = 0; col < 7; col++) { if(digits[z][col + row*7] == 1) frames[0][col+x + (row+y)*WIDTH] = digits[z][col + row*7]; } } y += 10; } if(getenv("PATH_INFO") != NULL) printf("Content-type: image/gif\n\n"); putc(0x47,stdout); /* G */ putc(0x49,stdout); /* I */ putc(0x46,stdout); /* F */ putc(0x38,stdout); /* 8 */ putc(0x39,stdout); /* 9 */ putc(0x61,stdout); /* a */ putc(WIDTH,stdout); putc(0,stdout); /* width */ putc(HEIGHT,stdout); putc(0,stdout); /* height */ putc(0xCC,stdout); /* global block */ putc(0x00,stdout); /* background color */ putc(0x00,stdout); /* pixel aspect */ for(i = 0;i < 96;i++) { putc(colors[i],stdout); } /* color table */ putc(0x21,stdout); /* extension block */ putc(0xF9,stdout); /* graphic control extension */ putc(0x04,stdout); /* block size (fixed) */ putc(0x09,stdout); /* flags */ putc(0x00,stdout); putc(0x0,stdout); /* delay */ putc(0,stdout); /* transparent color */ putc(0x00,stdout); /* block terminator */ putc(0x2C,stdout); /* image seperator */ putc(0,stdout); /* x offset */ putc(0x00,stdout); putc(0,stdout); /* y offset */ putc(0x00,stdout); putc(WIDTH,stdout); /* width */ putc(0x00,stdout); putc(HEIGHT,stdout); /* height */ putc(0x00,stdout); putc(0x04,stdout); /* local table, etc */ /* output compressed frame 1 */ putc(5,stdout); compress(6,0); putc(0x00,stdout); /* terminator */ putc(0x3B,stdout); /* end of GIF */ exit(0); }