Lines Matching refs:size
28 Vcchar_t* _vcbuffer(Vcodex_t* vc, Vcchar_t* trunc, ssize_t size, ssize_t head)
30 Vcchar_t* _vcbuffer(vc, trunc, size, head)
33 ssize_t size; /* the size needed for buffered data */
50 if(trunc >= b->buf && trunc < b->buf+b->size)
59 if(size < 0 ) /* just free the buffer */
60 { /**/DEBUG_SET(Busy, Busy - b->size);
63 /**/DEBUG_PRINT(2,"size=%d\n",b->size);
65 vc->busy -= b->size;
71 if(trunc+size > b->buf+b->size) /* no extension */
77 size += (head = trunc - (Vcchar_t*)b->buf);
78 if(size < 3*b->size/4 )
79 { if(!(n = (Vcbuffer_t*)realloc(b, sizeof(Vcbuffer_t)+size)) )
81 /**/DEBUG_SET(Busy, Busy - b->size + size);
84 /**/DEBUG_PRINT(2,"oldsize=%d ",b->size);
85 /**/DEBUG_PRINT(2,"newsize=%d\n",size);
87 vc->busy -= n->size - size; /* n->size is old b->size */
88 n->size = size;
100 else if(size < 0) /* free all buffers */
108 /**/DEBUG_SET(Busy, Busy - b->size);
111 /**/DEBUG_PRINT(2,"size=%d\n",b->size);
124 if(!(b = (Vcbuffer_t*)malloc(sizeof(Vcbuffer_t)+head+size)) )
126 b->size = head+size;
130 /**/DEBUG_SET(Busy, Busy + b->size);
133 /**/DEBUG_PRINT(2,"size=%d\n",b->size);
136 vc->busy += b->size;