Re: Pattern Matching

#include <stdio.h>
char gif [4096*1024];

int main (void) {
  int screenwidth;
  int screenheight;
  int pos;
  char resflag;
  int pixelaspectratio;
  int bgcolor;
  int imageseperator;
  int imageleft;
  int imagetop;
  int imagewidth;
  int imageheight;

  strcpy (gif, "GIF87a");

  screenwidth = 255;
  screenheight = 255;

  pos = strlen ("GIF87a");
  gif [pos+0] = 0;
  gif [pos+1] = screenwidth;
  gif [pos+2] = 0;
  gif [pos+3] = screenheight;
  pos += 4;

  resflag = 0;
  gif [pos] = resflag;
  pos += 1;

  bgcolor = 0;
  pixelaspectratio = 0;
  gif [pos+0] = bgcolor;
  gif [pos+1] = pixelaspectratio;

  pos += 2;

  imageseperator = 0x2c;
  gif [pos] = imageseperator;

  pos += 1;

  imageleft = 0;
  imagetop = 0;
  imagewidth = 255;
  imageheight = 255;

  gif [pos+0] = imageleft;
  gif [pos+1] = imagetop;
  gif [pos+2] = imagewidth;
  gif [pos+3] = imageheight;

  pos += 4;

  resflag = 0;
  gif [pos] = resflag;
  pos++;

}