Lines Matching refs:buf
78 unsigned char buf[CSD_BUF_SIZE]; member
95 static int GetDataBlock (gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP);
136 unsigned char buf[16]; in gdImageCreateFromGifCtx() local
154 if (! ReadOK(fd,buf,6)) { in gdImageCreateFromGifCtx()
157 if (strncmp((char *)buf,"GIF",3) != 0) { in gdImageCreateFromGifCtx()
161 if (memcmp((char *)buf+3, "87a", 3) == 0) { in gdImageCreateFromGifCtx()
163 } else if (memcmp((char *)buf+3, "89a", 3) == 0) { in gdImageCreateFromGifCtx()
169 if (! ReadOK(fd,buf,7)) { in gdImageCreateFromGifCtx()
173 BitPixel = 2<<(buf[4]&0x07); in gdImageCreateFromGifCtx()
175 ColorResolution = (int) (((buf[4]&0x70)>>3)+1); in gdImageCreateFromGifCtx()
176 Background = buf[5]; in gdImageCreateFromGifCtx()
177 AspectRatio = buf[6]; in gdImageCreateFromGifCtx()
179 screen_width = imw = LM_to_uint(buf[0],buf[1]); in gdImageCreateFromGifCtx()
180 screen_height = imh = LM_to_uint(buf[2],buf[3]); in gdImageCreateFromGifCtx()
182 haveGlobalColormap = BitSet(buf[4], LOCALCOLORMAP); /* Global Colormap */ in gdImageCreateFromGifCtx()
214 if (! ReadOK(fd,buf,9)) { in gdImageCreateFromGifCtx()
218 useGlobalColormap = ! BitSet(buf[8], LOCALCOLORMAP); in gdImageCreateFromGifCtx()
220 bitPixel = 1<<((buf[8]&0x07)+1); in gdImageCreateFromGifCtx()
221 left = LM_to_uint(buf[0], buf[1]); in gdImageCreateFromGifCtx()
222 top = LM_to_uint(buf[2], buf[3]); in gdImageCreateFromGifCtx()
223 width = LM_to_uint(buf[4], buf[5]); in gdImageCreateFromGifCtx()
224 height = LM_to_uint(buf[6], buf[7]); in gdImageCreateFromGifCtx()
236 im->interlace = BitSet(buf[8], INTERLACE); in gdImageCreateFromGifCtx()
243 BitSet(buf[8], INTERLACE), &ZeroDataBlock); in gdImageCreateFromGifCtx()
251 BitSet(buf[8], INTERLACE), &ZeroDataBlock); in gdImageCreateFromGifCtx()
305 unsigned char buf[256]; in DoExtension() local
309 memset(buf, 0, 4); /* initialize a few bytes in the case the next function fails */ in DoExtension()
310 (void) GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP); in DoExtension()
312 Gif89.disposal = (buf[0] >> 2) & 0x7; in DoExtension()
313 Gif89.inputFlag = (buf[0] >> 1) & 0x1; in DoExtension()
314 Gif89.delayTime = LM_to_uint(buf[1],buf[2]); in DoExtension()
316 if ((buf[0] & 0x1) != 0) in DoExtension()
317 *Transparent = buf[3]; in DoExtension()
319 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0); in DoExtension()
324 while (GetDataBlock(fd, (unsigned char*) buf, ZeroDataBlockP) > 0) in DoExtension()
332 GetDataBlock_(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock_() argument
342 if ((count != 0) && (! ReadOK(fd, buf, count))) { in GetDataBlock_()
351 GetDataBlock(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) in GetDataBlock() argument
356 rv = GetDataBlock_(fd,buf, ZeroDataBlockP); in GetDataBlock()
362 sprintf(&tmp[3*sizeof(char)*i], " %02x", buf[i]); in GetDataBlock()
395 scd->buf[0] = scd->buf[scd->last_byte-2]; in GetCode_()
396 scd->buf[1] = scd->buf[scd->last_byte-1]; in GetCode_()
398 if ((count = GetDataBlock(fd, &scd->buf[2], ZeroDataBlockP)) <= 0) in GetCode_()
411 ret |= ((scd->buf[i / 8] & (1 << (i % 8))) != 0) << j; in GetCode_()
486 unsigned char buf[260]; in LWZReadByte_() local
491 while ((count = GetDataBlock(fd, buf, ZeroDataBlockP)) > 0) in LWZReadByte_()