Lines Matching refs:pos
58 buf->pos = 0;
79 /* resize a buffer, pos and len will be repositioned if required when
90 buf->pos = MIN(newsize, buf->pos);
122 void buf_setpos(buffer* buf, unsigned int pos) {
124 if (pos > buf->len) {
127 buf->pos = pos;
132 if (incr > BUF_MAX_INCR || buf->pos + incr > buf->size) {
135 buf->pos += incr;
136 if (buf->pos > buf->len) {
137 buf->len = buf->pos;
142 * decrement the pos*/
145 (unsigned int)((int)buf->pos + incr) > buf->len
146 || ((int)buf->pos + incr) < 0) {
149 buf->pos += incr;
152 /* Get a byte from the buffer and increment the pos */
156 * bad case of pos > len, which should _never_ happen. */
157 if (buf->pos >= buf->len) {
160 return buf->data[buf->pos++];
163 /* Get a bool from the buffer and increment the pos */
176 if (buf->pos >= buf->len) {
179 buf->data[buf->pos] = val;
180 buf->pos++;
187 if (buf->pos + len > buf->len) {
190 return &buf->data[buf->pos];
197 if (buf->pos + len > buf->size) {
200 return &buf->data[buf->pos];
233 /* Get an uint32 from the buffer and increment the pos */
242 /* put a 32bit uint into the buffer, incr bufferlen & pos if required */
258 /* put the set of len bytes into the buffer, incrementing the pos, increasing