Lines Matching refs:buf
79 unsigned char buf[CSD_BUF_SIZE]; member
96 static int GetDataBlock (gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP);
137 unsigned char buf[16]; in gdImageCreateFromGifCtx() local
155 if (! ReadOK(fd,buf,6)) { in gdImageCreateFromGifCtx()
158 if (strncmp((char *)buf,"GIF",3) != 0) { in gdImageCreateFromGifCtx()
162 if (memcmp((char *)buf+3, "87a", 3) == 0) { in gdImageCreateFromGifCtx()
164 } else if (memcmp((char *)buf+3, "89a", 3) == 0) { in gdImageCreateFromGifCtx()
170 if (! ReadOK(fd,buf,7)) { in gdImageCreateFromGifCtx()
174 BitPixel = 2<<(buf[4]&0x07); in gdImageCreateFromGifCtx()
176 ColorResolution = (int) (((buf[4]&0x70)>>3)+1); in gdImageCreateFromGifCtx()
177 Background = buf[5]; in gdImageCreateFromGifCtx()
178 AspectRatio = buf[6]; in gdImageCreateFromGifCtx()
180 screen_width = imw = LM_to_uint(buf[0],buf[1]); in gdImageCreateFromGifCtx()
181 screen_height = imh = LM_to_uint(buf[2],buf[3]); in gdImageCreateFromGifCtx()
183 haveGlobalColormap = BitSet(buf[4], LOCALCOLORMAP); /* Global Colormap */ in gdImageCreateFromGifCtx()
215 if (! ReadOK(fd,buf,9)) { in gdImageCreateFromGifCtx()
219 useGlobalColormap = ! BitSet(buf[8], LOCALCOLORMAP); in gdImageCreateFromGifCtx()
221 bitPixel = 1<<((buf[8]&0x07)+1); in gdImageCreateFromGifCtx()
222 left = LM_to_uint(buf[0], buf[1]); in gdImageCreateFromGifCtx()
223 top = LM_to_uint(buf[2], buf[3]); in gdImageCreateFromGifCtx()
224 width = LM_to_uint(buf[4], buf[5]); in gdImageCreateFromGifCtx()
225 height = LM_to_uint(buf[6], buf[7]); in gdImageCreateFromGifCtx()
237 im->interlace = BitSet(buf[8], INTERLACE); in gdImageCreateFromGifCtx()
244 BitSet(buf[8], INTERLACE), &ZeroDataBlock); in gdImageCreateFromGifCtx()
252 BitSet(buf[8], INTERLACE), &ZeroDataBlock); in gdImageCreateFromGifCtx()
306 unsigned char buf[256]; in DoExtension() local
310 memset(buf, 0, 4); /* initialize a few bytes in the case the next function fails */ in DoExtension()
311 (void) GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP); in DoExtension()
313 Gif89.disposal = (buf[0] >> 2) & 0x7; in DoExtension()
314 Gif89.inputFlag = (buf[0] >> 1) & 0x1; in DoExtension()
315 Gif89.delayTime = LM_to_uint(buf[1],buf[2]); in DoExtension()
317 if ((buf[0] & 0x1) != 0) in DoExtension()
318 *Transparent = buf[3]; in DoExtension()
320 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0); in DoExtension()
325 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0) in DoExtension()
333 GetDataBlock_(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock_() argument
343 if ((count != 0) && (! ReadOK(fd, buf, count))) { in GetDataBlock_()
352 GetDataBlock(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock() argument
357 rv = GetDataBlock_(fd,buf, ZeroDataBlockP); in GetDataBlock()
363 sprintf(&tmp[3*sizeof(char)*i], " %02x", buf[i]); in GetDataBlock()
396 scd->buf[0] = scd->buf[scd->last_byte-2]; in GetCode_()
397 scd->buf[1] = scd->buf[scd->last_byte-1]; in GetCode_()
399 if ((count = GetDataBlock(fd, &scd->buf[2], ZeroDataBlockP)) <= 0) in GetCode_()
412 ret |= ((scd->buf[i / 8] & (1 << (i % 8))) != 0) << j; in GetCode_()
487 unsigned char buf[260]; in LWZReadByte_() local
492 while ((count = GetDataBlock(fd, buf, ZeroDataBlockP)) > 0) in LWZReadByte_()