Anonymous avatar Anonymous committed 3d209b2

- sync to 1.4.0

Comments (0)

Files changed (9)

 
 CC=gcc 
 AR=ar
-ARFLAGS=rc
 CFLAGS=-O
-LIB=libgd.a
 LIBS=-L./ -lgd -lm
 
-all: $(LIB) gddemo giftogd webgif
+all: libgd.a gddemo giftogd webgif
 
-gddemo: gddemo.o $(LIB) gd.h gdfonts.h gdfontl.h
+gddemo: gddemo.o libgd.a gd.h gdfonts.h gdfontl.h
 	$(CC) gddemo.o -o gddemo	$(LIBS)
 
-giftogd: giftogd.o $(LIB) gd.h
+giftogd: giftogd.o libgd.a gd.h
 	$(CC) giftogd.o -o giftogd	$(LIBS) 
 
-$(LIB): gd.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
+libgd.a: gd.o gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
 	gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h
-	rm -f $(LIB)
-	$(AR) $(ARFLAGS) $(LIB) gd.o gdfontt.o gdfonts.o gdfontmb.o \
+	rm -f libgd.a
+	$(AR) rc libgd.a gd.o gdfontt.o gdfonts.o gdfontmb.o \
 		gdfontl.o gdfontg.o
 
-webgif: webgif.o $(LIB) gd.h
+webgif: webgif.o libgd.a gd.h
 	$(CC) webgif.o -o webgif	$(LIBS)
 
 clean:

src/bdf-howto.txt

+fstobdf -server 10.1.1.2:7100 -fn -adobe-courier-bold-r-normal--14-100-
+100-100-m-90-iso8859-1 | ./bdftogd FontAdobe gdfonta
+
 char ${gdname}Data[] = {
 EOF
 
-for my $i (0 .. 255)
+my($i);
+for $i (0 .. 255)
 	{
 	$data[$i] = '' unless defined $data[$i];
 	$data[$i] = '0' x ($width * $height - length $data[$i]) . $data[$i];
 	
 	print FILEC "/* Char $i */\n";
-	for my $line (0 .. $height - 1)
+	my($line);
+	for $line (0 .. $height - 1)
 		{ print FILEC join ',', split(//, substr($data[$i], $line * $width, $width)), "\n"; }
 
 	print FILEC "\n";
 
 	next;
-	
-	for my $line (0 .. $height - 1)
+	my($line);	
+	for $line (0 .. $height - 1)
 		{ print substr($data[$i], $line * $width, $width), "\n"; }
 	}
 
 		/* NOW ROW-MAJOR IN GD 1.3 */
 		im->pixels[i] = (unsigned char *) calloc(
 			sx, sizeof(unsigned char));
-	}	
+	}
 	im->sx = sx;
 	im->sy = sy;
 	im->colorsTotal = 0;
 	int i;
 	for (i=0; (i<im->sy); i++) {
 		free(im->pixels[i]);
-	}	
+	}
 	free(im->pixels);
 	if (im->polyInts) {
 			free(im->polyInts);
 		if (im->open[i]) {
 			continue;
 		}
-		rd = (im->red[i] - r);	
+		rd = (im->red[i] - r);
 		gd = (im->green[i] - g);
 		bd = (im->blue[i] - b);
 		dist = rd * rd + gd * gd + bd * bd;
 		if ((i == 0) || (dist < mindist)) {
-			mindist = dist;	
+			mindist = dist;
 			ct = i;
 		}
 	}
 		if (im->open[i]) {
 			continue;
 		}
-		if ((im->red[i] == r) && 
+		if ((im->red[i] == r) &&
 			(im->green[i] == g) &&
 			(im->blue[i] == b)) {
 			return i;
 			ct = i;
 			break;
 		}
-	}	
+	}
 	if (ct == (-1)) {
 		ct = im->colorsTotal;
 		if (ct == gdMaxColors) {
 	}
 	hy = gdImageSY(im->brush)/2;
 	y1 = y - hy;
-	y2 = y1 + gdImageSY(im->brush);	
+	y2 = y1 + gdImageSY(im->brush);
 	hx = gdImageSX(im->brush)/2;
 	x1 = x - hx;
 	x2 = x1 + gdImageSX(im->brush);
 			srcx++;
 		}
 		srcy++;
-	}	
-}		
+	}
+}
 
 static void gdImageTileApply(gdImagePtr im, int x, int y)
 {
 		gdImageSetPixel(im, x, y,
 			im->tileColorMap[p]);
 	}
-}		
+}
 
 int gdImageGetPixel(gdImagePtr im, int x, int y)
 {
 				}
 				gdImageSetPixel(im, x, y, color);
 			}
-		}		
+		}
 	} else {
 		d = 2*dx - dy;
 		incr1 = 2*dx;
 				}
 				dashedSet(im, x, y, color, &on, &dashStep);
 			}
-		}		
+		}
 	} else {
 		d = 2*dx - dy;
 		incr1 = 2*dx;
 	*dashStepP = dashStep;
 	*onP = on;
 }
-	
+
 
 int gdImageBoundsSafe(gdImagePtr im, int x, int y)
 {
 		((x < 0) || (x >= im->sx))));
 }
 
-void gdImageChar(gdImagePtr im, gdFontPtr f, int x, int y, 
+void gdImageChar(gdImagePtr im, gdFontPtr f, int x, int y,
 	int c, int color)
 {
 	int cx, cy;
 	for (py = y; (py < (y + f->h)); py++) {
 		for (px = x; (px < (x + f->w)); px++) {
 			if (f->data[fline + cy * f->w + cx]) {
-				gdImageSetPixel(im, px, py, color);	
+				gdImageSetPixel(im, px, py, color);
 			}
 			cx++;
 		}
 	}
 }
 
-void gdImageCharUp(gdImagePtr im, gdFontPtr f, 
+void gdImageCharUp(gdImagePtr im, gdFontPtr f,
 	int x, int y, int c, int color)
 {
 	int cx, cy;
 	for (py = y; (py > (y - f->w)); py--) {
 		for (px = x; (px < (x + f->h)); px++) {
 			if (f->data[fline + cy * f->w + cx]) {
-				gdImageSetPixel(im, px, py, color);	
+				gdImageSetPixel(im, px, py, color);
 			}
 			cy++;
 		}
 	}
 }
 
-void gdImageString(gdImagePtr im, gdFontPtr f, 
+void gdImageString(gdImagePtr im, gdFontPtr f,
 	int x, int y, unsigned char *s, int color)
 {
 	int i;
 	}
 }
 
-void gdImageStringUp(gdImagePtr im, gdFontPtr f, 
+void gdImageStringUp(gdImagePtr im, gdFontPtr f,
 	int x, int y, unsigned char *s, int color)
 {
 	int i;
 
 static int strlen16(unsigned short *s);
 
-void gdImageString16(gdImagePtr im, gdFontPtr f, 
+void gdImageString16(gdImagePtr im, gdFontPtr f,
 	int x, int y, unsigned short *s, int color)
 {
 	int i;
 	}
 }
 
-void gdImageStringUp16(gdImagePtr im, gdFontPtr f, 
+void gdImageStringUp16(gdImagePtr im, gdFontPtr f,
 	int x, int y, unsigned short *s, int color)
 {
 	int i;
 
 /* s and e are integers modulo 360 (degrees), with 0 degrees
   being the rightmost extreme and degrees changing clockwise.
-  cx and cy are the center in pixels; w and h are the horizontal 
+  cx and cy are the center in pixels; w and h are the horizontal
   and vertical diameter in pixels. Nice interface, but slow, since
   I don't yet use Bresenham (I'm using an inefficient but
   simple solution with too much work going on in it; generalizing
 	}
 	for (i=s; (i <= e); i++) {
 		int x, y;
-		x = ((long)cost[i % 360] * (long)w2 / costScale) + cx; 
+		x = ((long)cost[i % 360] * (long)w2 / costScale) + cx;
 		y = ((long)sint[i % 360] * (long)h2 / sintScale) + cy;
 		if (i != s) {
-			gdImageLine(im, lx, ly, x, y, color);	
+			gdImageLine(im, lx, ly, x, y, color);
 		}
 		lx = x;
 		ly = y;
 	}
 	/* Seek right */
 	rightLimit = x;
-	for (i = (x+1); (i < im->sx); i++) {	
+	for (i = (x+1); (i < im->sx); i++) {
 		if (gdImageGetPixel(im, i, y) == border) {
 			break;
 		}
 			int c;
 			c = gdImageGetPixel(im, i, y-1);
 			if (lastBorder) {
-				if ((c != border) && (c != color)) {	
-					gdImageFillToBorder(im, i, y-1, 
-						border, color);		
+				if ((c != border) && (c != color)) {
+					gdImageFillToBorder(im, i, y-1,
+						border, color);
 					lastBorder = 0;
 				}
 			} else if ((c == border) || (c == color)) {
 			int c;
 			c = gdImageGetPixel(im, i, y+1);
 			if (lastBorder) {
-				if ((c != border) && (c != color)) {	
-					gdImageFillToBorder(im, i, y+1, 
-						border, color);		
+				if ((c != border) && (c != color)) {
+					gdImageFillToBorder(im, i, y+1,
+						border, color);
 					lastBorder = 0;
 				}
 			} else if ((c == border) || (c == color)) {
 	old = gdImageGetPixel(im, x, y);
 	if (color == gdTiled) {
 		/* Tile fill -- got to watch out! */
-		int p, tileColor;	
+		int p, tileColor;
 		int srcx, srcy;
 		if (!im->tile) {
 			return;
 			I can't do it without allocating another image */
 		if (gdImageGetTransparent(im->tile) != (-1)) {
 			return;
-		}	
+		}
 		srcx = x % gdImageSX(im->tile);
 		srcy = y % gdImageSY(im->tile);
 		p = gdImageGetPixel(im->tile, srcx, srcy);
 	}
 	/* Seek right */
 	rightLimit = x;
-	for (i = (x+1); (i < im->sx); i++) {	
+	for (i = (x+1); (i < im->sx); i++) {
 		if (gdImageGetPixel(im, i, y) != old) {
 			break;
 		}
 			int c;
 			c = gdImageGetPixel(im, i, y-1);
 			if (lastBorder) {
-				if (c == old) {	
-					gdImageFill(im, i, y-1, color);		
+				if (c == old) {
+					gdImageFill(im, i, y-1, color);
 					lastBorder = 0;
 				}
 			} else if (c != old) {
 			c = gdImageGetPixel(im, i, y+1);
 			if (lastBorder) {
 				if (c == old) {
-					gdImageFill(im, i, y+1, color);		
+					gdImageFill(im, i, y+1, color);
 					lastBorder = 0;
 				}
 			} else if (c != old) {
 		}
 	}
 }
-	
+
 /* Code drawn from ppmtogif.c, from the pbmplus package
 **
 ** Based on GIFENCOD by David Rowley <mgardi@watdscu.waterloo.edu>. A
 ** CompuServe Incorporated.  GIF(sm) is a Service Mark property of
 ** CompuServe Incorporated.
 *
-*  Heavily modified by Mouse, 1998-02-12.  
+*  Heavily modified by Mouse, 1998-02-12.
 *  Remove LZW compression.
 *  Added miGIF run length compression.
 *
 static int colorstobpp(int colors);
 static void BumpPixel (void);
 static int GIFNextPixel (gdImagePtr im);
-static void GIFEncode (FILE *fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im);
-static void Putword (int w, FILE *fp);
-static void compress (int, FILE *, gdImagePtr, int);
+static void GIFEncode (gdSinkPtr fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im);
+static void Putword (int w, gdSinkPtr fp);
+static void compress (int, gdSinkPtr, gdImagePtr, int);
 static void output (code_int code);
 static void char_init (void);
 static void char_out (int c);
 /* Allows for reuse */
 static void init_statics(void);
 
+static int stdioSink(void *context, char *buffer, int len)
+{
+	return fwrite(buffer, 1, len, (FILE *) context);
+}
+
 void gdImageGif(gdImagePtr im, FILE *out)
 {
+	gdSink mySink;
+	mySink.context = (void *) out;
+	mySink.sink = stdioSink;
+	gdImageGifToSink(im, &mySink);
+}
+
+void gdImageGifToSink(gdImagePtr im, gdSinkPtr out)
+{
 	int interlace, transparent, BitsPerPixel;
 	interlace = im->interlace;
 	transparent = im->transparent;
         return r;
 }
 
+static void sinkPutC(int B, gdSinkPtr fp)
+{
+	unsigned char b = B;
+	fp->sink(fp->context, (char *) &b, 1);
+}
+
 /* public */
 
 static void
-GIFEncode(FILE *fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im)
+GIFEncode(gdSinkPtr fp, int GWidth, int GHeight, int GInterlace, int Background, int Transparent, int BitsPerPixel, int *Red, int *Green, int *Blue, gdImagePtr im)
 {
         int B;
         int RWidth, RHeight;
         /*
          * Write the Magic header
          */
-        fwrite( Transparent < 0 ? "GIF87a" : "GIF89a", 1, 6, fp );
+        fp->sink(fp->context, Transparent < 0 ? "GIF87a" : "GIF89a", 6);
 
         /*
          * Write out the screen width and height
         /*
          * Write it out
          */
-        fputc( B, fp );
+        sinkPutC( B, fp );
 
         /*
          * Write out the Background colour
          */
-        fputc( Background, fp );
+        sinkPutC( Background, fp );
 
         /*
          * Byte of 0's (future expansion)
          */
-        fputc( 0, fp );
+        sinkPutC( 0, fp );
 
         /*
          * Write out the Global Colour Map
          */
         for( i=0; i<ColorMapSize; ++i ) {
-                fputc( Red[i], fp );
-                fputc( Green[i], fp );
-                fputc( Blue[i], fp );
+                sinkPutC( Red[i], fp );
+                sinkPutC( Green[i], fp );
+                sinkPutC( Blue[i], fp );
         }
 
 	/*
 	 * Write out extension for transparent colour index, if necessary.
 	 */
 	if ( Transparent >= 0 ) {
-	    fputc( '!', fp );
-	    fputc( 0xf9, fp );
-	    fputc( 4, fp );
-	    fputc( 1, fp );
-	    fputc( 0, fp );
-	    fputc( 0, fp );
-	    fputc( (unsigned char) Transparent, fp );
-	    fputc( 0, fp );
+	    sinkPutC( '!', fp );
+	    sinkPutC( 0xf9, fp );
+	    sinkPutC( 4, fp );
+	    sinkPutC( 1, fp );
+	    sinkPutC( 0, fp );
+	    sinkPutC( 0, fp );
+	    sinkPutC( (unsigned char) Transparent, fp );
+	    sinkPutC( 0, fp );
 	}
 
         /*
          * Write an Image separator
          */
-        fputc( ',', fp );
+        sinkPutC( ',', fp );
 
         /*
          * Write the Image header
          * Write out whether or not the image is interlaced
          */
         if( Interlace )
-                fputc( 0x40, fp );
+                sinkPutC( 0x40, fp );
         else
-                fputc( 0x00, fp );
+                sinkPutC( 0x00, fp );
 
         /*
          * Write out the initial code size
          */
-        fputc( InitCodeSize, fp );
+        sinkPutC( InitCodeSize, fp );
 
         /*
          * Go and actually compress the data
         /*
          * Write out a Zero-length packet (to end the series)
          */
-        fputc( 0, fp );
+        sinkPutC( 0, fp );
 
         /*
          * Write the GIF file terminator
          */
-        fputc( ';', fp );
+        sinkPutC( ';', fp );
 }
 
 /*
  * Write out a word to the GIF file
  */
 static void
-Putword(int w, FILE *fp)
+Putword(int w, gdSinkPtr fp)
 {
-        fputc( w & 0xff, fp );
-        fputc( (w / 256) & 0xff, fp );
+	unsigned char buf[2];
+	buf[0] = w & 0xff;
+	buf[1] = (w / 256) & 0xff;
+        fp->sink(fp->context, (char *) buf, 2);
 }
 
 #define GIFBITS 12
  * documentation for any purpose and without fee is hereby granted, provided
  * that the above copyright notice appear in all copies and that both that
  * copyright notice and this permission notice appear in supporting
- * documentation.  This software is provided "AS IS." The Hutchison Avenue 
- * Software Corporation disclaims all warranties, either express or implied, 
- * including but not limited to implied warranties of merchantability and 
+ * documentation.  This software is provided "AS IS." The Hutchison Avenue
+ * Software Corporation disclaims all warranties, either express or implied,
+ * including but not limited to implied warranties of merchantability and
  * fitness for a particular purpose, with respect to this code and accompanying
- * documentation. 
- * 
- * The miGIF compression routines do not, strictly speaking, generate files 
- * conforming to the GIF spec, since the image data is not LZW-compressed 
- * (this is the point: in order to avoid transgression of the Unisys patent 
- * on the LZW algorithm.)  However, miGIF generates data streams that any 
+ * documentation.
+ *
+ * The miGIF compression routines do not, strictly speaking, generate files
+ * conforming to the GIF spec, since the image data is not LZW-compressed
+ * (this is the point: in order to avoid transgression of the Unisys patent
+ * on the LZW algorithm.)  However, miGIF generates data streams that any
  * reasonably sane LZW decompresser will decompress to what we want.
  *
- * miGIF compression uses run length encoding. It compresses horizontal runs 
+ * miGIF compression uses run length encoding. It compresses horizontal runs
  * of pixels of the same color. This type of compression gives good results
- * on images with many runs, for example images with lines, text and solid 
- * shapes on a solid-colored background. It gives little or no compression 
+ * on images with many runs, for example images with lines, text and solid
+ * shapes on a solid-colored background. It gives little or no compression
  * on images with few runs, for example digital or scanned photos.
  *
  *                               der Mouse
 static int code_eof;
 static unsigned int obuf;
 static int obits;
-static FILE *ofile;
+static gdSinkPtr ofile;
 static unsigned char oblock[256];
 static int oblen;
 
     for (i=0;i<oblen;i++) printf(" %02x",oblock[i]);
     printf("\n");
   }
- fputc(oblen,ofile);
- fwrite(&oblock[0],1,oblen,ofile);
+ sinkPutC(oblen,ofile);
+ ofile->sink(ofile->context, &oblock[0], oblen);
  oblen = 0;
 }
 
  rl_count = 0;
 }
 
-static void compress(int init_bits, FILE *outfile, gdImagePtr im, int background)
+static void compress(int init_bits, gdSinkPtr outfile, gdImagePtr im, int background)
 {
  int c;
 
  rl_basecode = code_eof + 1;
  out_bump_init = (1 << (init_bits - 1)) - 1;
  /* for images with a lot of runs, making out_clear_init larger will
-    give better compression. */ 
+    give better compression. */
  out_clear_init = (init_bits <= 3) ? 9 : (out_bump_init-1);
 #ifdef DEBUGGING_ENVARS
   { const char *ocienv;
 #define LOCALCOLORMAP  0x80
 #define BitSet(byte, bit)      (((byte) & (bit)) == (bit))
 
-#define        ReadOK(file,buffer,len) (fread(buffer, len, 1, file) != 0)
+#define        ReadOK(from, buffer, len) \
+	(from->source(from->context, buffer, len) > 0)
 
 #define LM_to_uint(a,b)                        (((b)<<8)|(a))
 
        int     disposal;
 } Gif89 = { -1, -1, -1, 0 };
 
-static int ReadColorMap (FILE *fd, int number, unsigned char (*buffer)[256]);
-static int DoExtension (FILE *fd, int label, int *Transparent);
-static int GetDataBlock (FILE *fd, unsigned char *buf);
-static int GetCode (FILE *fd, int code_size, int flag);
-static int LWZReadByte (FILE *fd, int flag, int input_code_size);
-static void ReadImage (gdImagePtr im, FILE *fd, int len, int height, unsigned char (*cmap)[256], int interlace, int ignore);
+static int ReadColorMap (gdSourcePtr fd, int number, unsigned char (*buffer)[256]);
+static int DoExtension (gdSourcePtr fd, int label, int *Transparent);
+static int GetDataBlock (gdSourcePtr fd, unsigned char *buf);
+static int GetCode (gdSourcePtr fd, int code_size, int flag);
+static int LWZReadByte (gdSourcePtr fd, int flag, int input_code_size);
+static void ReadImage (gdImagePtr im, gdSourcePtr fd, int len, int height, unsigned char (*cmap)[256], int interlace);
 
 int ZeroDataBlock;
 
+static int freadWrapper(void *context, char *buf, int len);
+
+gdImagePtr
+gdImageCreateFromGif(FILE *in)
+{
+	gdSource s;
+	s.source = freadWrapper;
+	s.context = in;
+	return gdImageCreateFromGifSource(&s);
+}
+
+static int freadWrapper(void *context, char *buf, int len)
+{
+	int got = fread(buf, 1, len, (FILE *) context);
+	return got;
+}
+
 gdImagePtr
-gdImageCreateFromGif(FILE *fd)
+gdImageCreateFromGifSource(gdSourcePtr fd)
 {
-       int imageNumber;
        int BitPixel;
        int ColorResolution;
        int Background;
        int             imw, imh;
        int             useGlobalColormap;
        int             bitPixel;
-       int             imageCount = 0;
+	int i;
        char            version[4];
        gdImagePtr im = 0;
        ZeroDataBlock = FALSE;
 
-       imageNumber = 1;
        if (! ReadOK(fd,buf,6)) {
 		return 0;
 	}
                        return 0;
                }
                if (c == ';') {         /* GIF terminator */
-                       int i;
-                       if (imageCount < imageNumber) {
-                               return 0;
-                       }
-                       /* Terminator before any image was declared! */
-                       if (!im) {
-                              return 0;
-                       }
-		       /* Check for open colors at the end, so
-                          we can reduce colorsTotal and ultimately
-                          BitsPerPixel */
-                       for (i=((im->colorsTotal-1)); (i>=0); i--) {
-                               if (im->open[i]) {
-                                       im->colorsTotal--;
-                               } else {
-                                       break;
-                               }
-                       } 
-                       return im;
+				   goto terminated;
                }
 
                if (c == '!') {         /* Extension */
                        continue;
                }
 
-               ++imageCount;
-
                if (! ReadOK(fd,buf,9)) {
 	               return 0;
                }
 	       }
                im->interlace = BitSet(buf[8], INTERLACE);
                if (! useGlobalColormap) {
-                       if (ReadColorMap(fd, bitPixel, localColorMap)) { 
+                       if (ReadColorMap(fd, bitPixel, localColorMap)) {
                                  return 0;
                        }
-                       ReadImage(im, fd, imw, imh, localColorMap, 
-                                 BitSet(buf[8], INTERLACE), 
-                                 imageCount != imageNumber);
+                       ReadImage(im, fd, imw, imh, localColorMap,
+                             BitSet(buf[8], INTERLACE));
                } else {
                        ReadImage(im, fd, imw, imh,
-                                 ColorMap, 
-                                 BitSet(buf[8], INTERLACE), 
-                                 imageCount != imageNumber);
+                                 ColorMap,
+                             BitSet(buf[8], INTERLACE));
                }
                if (Transparent != (-1)) {
                        gdImageColorTransparent(im, Transparent);
-               }	   
-       }
+               }
+				/* We have an image now. Let's get out of Dodge. */
+			   goto terminated;
+   }
+terminated:
+   /* Terminator before any image was declared! */
+   if (!im) {
+          return 0;
+   }
+		/* Check for open colors at the end, so
+			we can reduce colorsTotal and ultimately
+			BitsPerPixel */
+   for (i=((im->colorsTotal-1)); (i>=0); i--) {
+           if (im->open[i]) {
+                   im->colorsTotal--;
+           } else {
+                   break;
+           }
+   }
+   return im;
 }
 
 static int
-ReadColorMap(FILE *fd, int number, unsigned char (*buffer)[256])
+ReadColorMap(gdSourcePtr fd, int number, unsigned char (*buffer)[256])
 {
        int             i;
        unsigned char   rgb[3];
 }
 
 static int
-DoExtension(FILE *fd, int label, int *Transparent)
+DoExtension(gdSourcePtr fd, int label, int *Transparent)
 {
        static unsigned char     buf[256];
 
 }
 
 static int
-GetDataBlock_(FILE *fd, unsigned char *buf)
+GetDataBlock_(gdSourcePtr fd, unsigned char *buf)
 {
        unsigned char   count;
 
 }
 
 static int
-GetDataBlock(FILE *fd, unsigned char *buf)
+GetDataBlock(gdSourcePtr fd, unsigned char *buf)
 {
  int rv;
  int i;
 }
 
 static int
-GetCode_(FILE *fd, int code_size, int flag)
+GetCode_(gdSourcePtr fd, int code_size, int flag)
 {
        static unsigned char    buf[280];
        static int              curbit, lastbit, done, last_byte;
                if (done) {
                        if (curbit >= lastbit) {
                                 /* Oh well */
-                       }                        
+                       }
                        return -1;
                }
                buf[0] = buf[last_byte-2];
 }
 
 static int
-GetCode(FILE *fd, int code_size, int flag)
+GetCode(gdSourcePtr fd, int code_size, int flag)
 {
  int rv;
 
  return(rv);
 }
 
+#define STACK_SIZE ((1<<(MAX_LWZ_BITS))*2)
 static int
-LWZReadByte_(FILE *fd, int flag, int input_code_size)
+LWZReadByte_(gdSourcePtr fd, int flag, int input_code_size)
 {
        static int      fresh = FALSE;
        int             code, incode;
        static int      firstcode, oldcode;
        static int      clear_code, end_code;
        static int      table[2][(1<< MAX_LWZ_BITS)];
-       static int      stack[(1<<(MAX_LWZ_BITS))*2], *sp;
+   static int      stack[STACK_SIZE], *sp;
        register int    i;
 
        if (flag) {
                max_code = clear_code+2;
 
                GetCode(fd, 0, TRUE);
-               
+
                fresh = TRUE;
 
                for (i = 0; i < clear_code; ++i) {
 
                incode = code;
 
+			   if (sp == (stack + STACK_SIZE)) {
+					/* Bad compressed data stream */
+					return -1;
+			   }
                if (code >= max_code) {
                        *sp++ = firstcode;
                        code = oldcode;
                }
 
                while (code >= clear_code) {
+					   if (sp == (stack + STACK_SIZE)) {
+							/* Bad compressed data stream */
+							return -1;
+					   }
                        *sp++ = table[1][code];
                        if (code == table[0][code]) {
                                /* Oh well */
 }
 
 static int
-LWZReadByte(FILE *fd, int flag, int input_code_size)
+LWZReadByte(gdSourcePtr fd, int flag, int input_code_size)
 {
  int rv;
 
 }
 
 static void
-ReadImage(gdImagePtr im, FILE *fd, int len, int height, unsigned char (*cmap)[256], int interlace, int ignore)
+ReadImage(gdImagePtr im, gdSourcePtr fd, int len, int height, unsigned char (*cmap)[256], int interlace)
 {
-       unsigned char   c;      
+       unsigned char   c;
        int             v;
        int             xpos = 0, ypos = 0, pass = 0;
        int i;
        /* Stash the color map into the image */
        for (i=0; (i<gdMaxColors); i++) {
-               im->red[i] = cmap[CM_RED][i];	
-               im->green[i] = cmap[CM_GREEN][i];	
-               im->blue[i] = cmap[CM_BLUE][i];	
+               im->red[i] = cmap[CM_RED][i];
+               im->green[i] = cmap[CM_GREEN][i];
+               im->blue[i] = cmap[CM_BLUE][i];
                im->open[i] = 1;
        }
        /* Many (perhaps most) of these colors will remain marked open. */
        **  Initialize the Compression routines
        */
        if (! ReadOK(fd,&c,1)) {
-               return; 
-       }
-       if (LWZReadByte(fd, TRUE, c) < 0) {
                return;
        }
-
-       /*
-       **  If this is an "uninteresting picture" ignore it.
-       */
-       if (ignore) {
-               while (LWZReadByte(fd, FALSE, c) >= 0)
-                       ;
+       if (LWZReadByte(fd, TRUE, c) < 0) {
                return;
        }
 
 
 void gdImageRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color)
 {
-	gdImageLine(im, x1, y1, x2, y1, color);		
-	gdImageLine(im, x1, y2, x2, y2, color);		
+	gdImageLine(im, x1, y1, x2, y1, color);
+	gdImageLine(im, x1, y2, x2, y2, color);
 	gdImageLine(im, x1, y1, x1, y2, color);
 	gdImageLine(im, x2, y1, x2, y2, color);
 }
 				/* If it's the same image, mapping is trivial */
 				if (dst == src) {
 					nc = c;
-				} else { 
+				} else {
 					/* First look for an exact match */
 					nc = gdImageColorExact(dst,
 						src->red[c], src->green[c],
 						src->blue[c]);
-				}	
+				}
 				if (nc == (-1)) {
 					/* No, so try to allocate it */
 					nc = gdImageColorAllocate(dst,
 		}
 		toy++;
 	}
-}			
+}
 
 void gdImageCopyResized(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)
 {
 	for (i=0; (i < srcW); i++) {
 		int got;
 		accum += (double)dstW/(double)srcW;
-		got = floor(accum);
+		got = (int) floor(accum);
 		stx[i] = got;
 		accum -= got;
 	}
 	for (i=0; (i < srcH); i++) {
 		int got;
 		accum += (double)dstH/(double)srcH;
-		got = floor(accum);
+		got = (int) floor(accum);
 		sty[i] = got;
 		accum -= got;
 	}
 					/* If it's the same image, mapping is trivial */
 					if (dst == src) {
 						nc = c;
-					} else { 
+					} else {
 						/* First look for an exact match */
 						nc = gdImageColorExact(dst,
 							src->red[c], src->green[c],
 							src->blue[c]);
-					}	
+					}
 					if (nc == (-1)) {
 						/* No, so try to allocate it */
 						nc = gdImageColorAllocate(dst,
 		return 0;
 	}
 	*result = r << 8;
-	r = getc(in);	
+	r = getc(in);
 	if (r == EOF) {
 		return 0;
 	}
 		if (!gdGetByte(&im->blue[i], in)) {
 			goto fail2;
 		}
-	}	
+	}
 	for (y=0; (y<sy); y++) {
-		for (x=0; (x<sx); x++) {	
+		for (x=0; (x<sx); x++) {
 			int ch;
 			ch = getc(in);
 			if (ch == EOF) {
 fail1:
 	return 0;
 }
-	
+
 void gdImageGd(gdImagePtr im, FILE *out)
 {
 	int x, y;
 	trans = im->transparent;
 	if (trans == (-1)) {
 		trans = 257;
-	}	
+	}
 	gdPutWord(trans, out);
 	for (i=0; (i<gdMaxColors); i++) {
 		putc((unsigned char)im->red[i], out);
-		putc((unsigned char)im->green[i], out);	
-		putc((unsigned char)im->blue[i], out);	
+		putc((unsigned char)im->green[i], out);
+		putc((unsigned char)im->blue[i], out);
 	}
-	for (y=0; (y < im->sy); y++) {	
-		for (x=0; (x < im->sx); x++) {	
+	for (y=0; (y < im->sy); y++) {
+		for (x=0; (x < im->sx); x++) {
 			/* ROW-MAJOR IN GD 1.3 */
 			putc((unsigned char)im->pixels[y][x], out);
 		}
 gdImagePtr
 gdImageCreateFromXbm(FILE *fd)
 {
-	gdImagePtr im;	
+	gdImagePtr im;
 	int bit;
 	int w, h;
 	int bytes;
 			}
 			if (ch == 'x') {
 				break;
-			}	
+			}
 		}
 		/* Get hex value */
 		ch = getc(fd);
 		}
 		h[1] = ch;
 		h[2] = '\0';
-		sscanf(h, "%x", &b);		
+		sscanf(h, "%x", &b);
 		for (bit = 1; (bit <= 128); (bit = bit << 1)) {
-			gdImageSetPixel(im, x++, y, (b & bit) ? 1 : 0);	
+			gdImageSetPixel(im, x++, y, (b & bit) ? 1 : 0);
 			if (x == im->sx) {
 				x = 0;
 				y++;
 		lx = p->x;
 		ly = p->y;
 	}
-}	
-	
+}
+
 int gdCompareInt(const void *a, const void *b);
-	
+
+/* THANKS to Kirsten Schulz for the polygon fixes! */
+
+/* The intersection finding technique of this code could be improved  */
+/* by remembering the previous intertersection, and by using the slope.*/
+/* That could help to adjust intersections  to produce a nice */
+/* interior_extrema. */
+
 void gdImageFilledPolygon(gdImagePtr im, gdPointPtr p, int n, int c)
 {
 	int i;
 	int y;
-	int y1, y2;
+	int miny, maxy;
 	int ints;
+	int x1, y1;
+	int x2, y2;
+	int ind1, ind2;
 	if (!n) {
 		return;
 	}
 	if (!im->polyAllocated) {
 		im->polyInts = (int *) malloc(sizeof(int) * n);
 		im->polyAllocated = n;
-	}		
+	}
 	if (im->polyAllocated < n) {
 		while (im->polyAllocated < n) {
 			im->polyAllocated *= 2;
-		}	
+		}
 		im->polyInts = (int *) realloc(im->polyInts,
 			sizeof(int) * im->polyAllocated);
 	}
-	y1 = p[0].y;
-	y2 = p[0].y;
+	miny = p[0].y;
+	maxy = p[0].y;
 	for (i=1; (i < n); i++) {
-		if (p[i].y < y1) {
-			y1 = p[i].y;
+		if (p[i].y < miny) {
+			miny = p[i].y;
 		}
-		if (p[i].y > y2) {
-			y2 = p[i].y;
+		if (p[i].y > maxy) {
+			maxy = p[i].y;
 		}
 	}
-	/* Fix in 1.3: count a vertex only once */
-	for (y=y1; (y < y2); y++) {
-		int interLast = 0;
-		int dirLast = 0;
-		int interFirst = 1;
+	for (y=miny; (y < maxy); y++) {
 		ints = 0;
-		for (i=0; (i <= n); i++) {
-			int x1, x2;
-			int y1, y2;
-			int dir;
-			int ind1, ind2;
-			int lastInd1 = 0;
-			if ((i == n) || (!i)) {
+		for (i=0; (i < n); i++) {
+			if (!i) {
 				ind1 = n-1;
 				ind2 = 0;
 			} else {
 			y1 = p[ind1].y;
 			y2 = p[ind2].y;
 			if (y1 < y2) {
-				y1 = p[ind1].y;
-				y2 = p[ind2].y;
 				x1 = p[ind1].x;
 				x2 = p[ind2].x;
-				dir = -1;
 			} else if (y1 > y2) {
 				y2 = p[ind1].y;
 				y1 = p[ind2].y;
 				x2 = p[ind1].x;
 				x1 = p[ind2].x;
-				dir = 1;
 			} else {
-				/* Horizontal; just draw it */
-				gdImageLine(im, 
-					p[ind1].x, y1, 
-					p[ind2].x, y1,
-					c);
 				continue;
 			}
-			if ((y >= y1) && (y <= y2)) {
-				int inter = 
-					(y-y1) * (x2-x1) / (y2-y1) + x1;
-				/* Only count intersections once
-					except at maxima and minima. Also, 
-					if two consecutive intersections are
-					endpoints of the same horizontal line
-					that is not at a maxima or minima,	
-					discard the leftmost of the two. */
-				if (!interFirst) {
-					if ((p[ind1].y == p[lastInd1].y) &&
-						(p[ind1].x != p[lastInd1].x)) {
-						if (dir == dirLast) {
-							if (inter > interLast) {
-								/* Replace the old one */
-								im->polyInts[ints] = inter;
-							} else {
-								/* Discard this one */
-							}	
-							continue;
-						}
-					}
-					if (inter == interLast) {
-						if (dir == dirLast) {
-							continue;
-						}
-					}
-				} 
-				if (i > 0) {
-					im->polyInts[ints++] = inter;
-				}
-				lastInd1 = i;
-				dirLast = dir;
-				interLast = inter;
-				interFirst = 0;
+			if ((y >= y1) && (y < y2)) {
+			 	im->polyInts[ints++] = (y-y1) * (x2-x1) / (y2-y1) + x1;
 			}
 		}
 		qsort(im->polyInts, ints, sizeof(int), gdCompareInt);
-		for (i=0; (i < (ints-1)); i+=2) {
+		for (i=0; (i < (ints)); i+=2) {
 			gdImageLine(im, im->polyInts[i], y,
 				im->polyInts[i+1], y, c);
 		}
 	}
 }
-	
+
 int gdCompareInt(const void *a, const void *b)
 {
 	return (*(const int *)a) - (*(const int *)b);
 	if (im->style) {
 		free(im->style);
 	}
-	im->style = (int *) 
+	im->style = (int *)
 		malloc(sizeof(int) * noOfPixels);
 	memcpy(im->style, style, sizeof(int) * noOfPixels);
 	im->styleLength = noOfPixels;
 	im->brush = brush;
 	for (i=0; (i < gdImageColorsTotal(brush)); i++) {
 		int index;
-		index = gdImageColorExact(im, 
+		index = gdImageColorExact(im,
 			gdImageRed(brush, i),
 			gdImageGreen(brush, i),
 			gdImageBlue(brush, i));
 		im->brushColorMap[i] = index;
 	}
 }
-	
+
 void gdImageSetTile(gdImagePtr im, gdImagePtr tile)
 {
 	int i;
 	im->tile = tile;
 	for (i=0; (i < gdImageColorsTotal(tile)); i++) {
 		int index;
-		index = gdImageColorExact(im, 
+		index = gdImageColorExact(im,
 			gdImageRed(tile, i),
 			gdImageGreen(tile, i),
 			gdImageBlue(tile, i));
 
 /* Image type. See functions below; you will not need to change
 	the elements directly. Use the provided macros to
-	access sx, sy, the color table, and colorsTotal for 
+	access sx, sy, the color table, and colorsTotal for
 	read-only purposes. */
 
 typedef struct gdImageStruct {
 	int colorsTotal;
 	int red[gdMaxColors];
 	int green[gdMaxColors];
-	int blue[gdMaxColors]; 
+	int blue[gdMaxColors];
 	int open[gdMaxColors];
 	int transparent;
 	int *polyInts;
 	int polyAllocated;
 	struct gdImageStruct *brush;
-	struct gdImageStruct *tile;	
+	struct gdImageStruct *tile;
 	int brushColorMap[gdMaxColors];
 	int tileColorMap[gdMaxColors];
 	int styleLength;
 gdImagePtr gdImageCreateFromGif(FILE *fd);
 gdImagePtr gdImageCreateFromGd(FILE *in);
 gdImagePtr gdImageCreateFromXbm(FILE *fd);
+
+/* A custom data source. */
+
+/* The source function must return -1 on error, otherwise the number
+	of bytes fetched. 0 is EOF, not an error! */
+
+/* context will be passed to your source function. */
+
+typedef struct {
+	int (*source) (void *context, char *buffer, int len);
+	void *context;
+} gdSource, *gdSourcePtr;
+
+gdImagePtr gdImageCreateFromGifSource(
+	gdSourcePtr in);
+
 void gdImageDestroy(gdImagePtr im);
 void gdImageSetPixel(gdImagePtr im, int x, int y, int color);
 int gdImageGetPixel(gdImagePtr im, int x, int y);
 int gdImageColorExact(gdImagePtr im, int r, int g, int b);
 void gdImageColorDeallocate(gdImagePtr im, int color);
 void gdImageColorTransparent(gdImagePtr im, int color);
+
+/* A custom data sink. */
+
+/* The sink function must return -1 on error, otherwise the number
+	of bytes written, which must be equal to len. */
+
+/* context will be passed to your sink function. */
+
+typedef struct {
+	int (*sink) (void *context, char *buffer, int len);
+	void *context;
+} gdSink, *gdSinkPtr;
+
 void gdImageGif(gdImagePtr im, FILE *out);
+void gdImageGifToSink(gdImagePtr im, gdSinkPtr out);
+
 void gdImageGd(gdImagePtr im, FILE *out);
 void gdImageArc(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color);
 void gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int color);
+
+/*
+	This is a header file for gd font, generated using
+	bdftogd version 0.51 by Jan Pazdziora, adelton@fi.muni.cz
+	from bdf font
+	-Adobe-Courier-Bold-R-Normal--14-100-100-100-M-90-ISO8859-1
+	at Sun Jul 19 12:41:12 1998.
+	The original bdf was holding following copyright:
+	"Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved."
+ */
+
+
+#include "gdfonta.h"
+
+char gdFontAdobeData[] = {
+/* Char 0 */
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0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