Lines Matching refs:tail

19 	mb->tail = mb->start;  in membuff_purge()
40 if (mb->head >= mb->tail) { in membuff_putrawflex()
54 if ((maxlen < 0 || len < maxlen) && mb->tail != mb->start) { in membuff_putrawflex()
63 len = mb->tail - mb->head - 1; in membuff_putrawflex()
110 if (mb->head > mb->tail) { in membuff_getraw()
112 *data = mb->tail; in membuff_getraw()
113 len = mb->head - mb->tail; in membuff_getraw()
121 mb->tail += len; in membuff_getraw()
129 else if (mb->head < mb->tail) { in membuff_getraw()
131 *data = mb->tail; in membuff_getraw()
132 len = mb->end - mb->tail; in membuff_getraw()
136 mb->tail += len; in membuff_getraw()
137 if (mb->tail == mb->end) in membuff_getraw()
138 mb->tail = mb->start; in membuff_getraw()
144 (int)(mb->tail - mb->start), (int)(*data - mb->start), len); in membuff_getraw()
209 return mb->head == mb->tail; in membuff_isempty()
239 (int)(mb->head - mb->start), (int)(mb->tail - mb->start), in membuff_makecontig()
246 if (mb->tail > mb->head) { in membuff_makecontig()
252 topsize = mb->end - mb->tail; in membuff_makecontig()
259 if (mb->head + topsize >= mb->tail) in membuff_makecontig()
266 topsize = mb->head - mb->tail; in membuff_makecontig()
271 memcpy(mb->start, mb->tail, topsize); in membuff_makecontig()
272 debug(" - memcpy(%d, %d, %d)", 0, (int)(mb->tail - mb->start), topsize); in membuff_makecontig()
275 mb->tail = mb->start; in membuff_makecontig()
279 (int)(mb->tail - mb->start)); in membuff_makecontig()
298 end = mb->head >= mb->tail ? mb->head : mb->end; in membuff_readline()
299 for (len = 0, s = mb->tail; s < end && len < maxlen - 1; str++) { in membuff_readline()
306 if (s == end && mb->tail > mb->head) { in membuff_readline()
321 mb->tail = s == mb->end ? mb->start : s; in membuff_readline()
345 oldtail = mb->tail - mb->start; in membuff_extend_by()
351 mb->tail = mb->start + oldtail; in membuff_extend_by()
353 if (mb->head < mb->tail) { in membuff_extend_by()
354 memmove(mb->tail + by, mb->tail, orig - oldtail); in membuff_extend_by()
355 mb->tail += by; in membuff_extend_by()