Lines Matching refs:used
19 * subregions. The used region and the available region are disjoint, and
20 * their union is the buffer's region. The used region extends from the
21 * beginning of the buffer region to the last used byte. The available
22 * region extends from one byte greater than the last used byte to the
23 * end of the buffer's region. The size of the used region can be changed
24 * using various buffer commands. Initially, the used region is empty.
26 * The used region is further subdivided into two disjoint regions: the
28 * regions is the used region. The consumed region extends from the
29 * beginning of the used region to the byte before the current offset (if
30 * any). The remaining region the current pointer to the end of the used
43 * /----- used region -----\\/-- available --\\
52 * d == used pointer.
56 * a-d == used region.
70 * respectively increase and decrease the used space in buffer *b by n
73 * allocate or deallocate memory. They just change the value of used.
76 * used , current and active to zero.
123 b->used = 0;
138 b->used = 0;
143 /* Increase the 'used' region of 'b' by 'n' bytes. */
149 REQUIRE(b->used + n <= b->length);
151 b->used += n;
154 /* Decrease the 'used' region of 'b' by 'n' bytes. */
160 REQUIRE(b->used >= n);
162 b->used -= n;
163 if (b->current > b->used)
164 b->current = b->used;
165 if (b->active > b->used)
166 b->active = b->used;
169 /* Make the used region empty. */
176 b->used = 0;
197 REQUIRE(b->current + n <= b->used);
222 REQUIRE(b->used - b->current >= 1);
239 REQUIRE(b->used + 1 <= b->length);
242 cp += b->used;
243 b->used += 1;
256 REQUIRE(b->used - b->current >= 2);
274 REQUIRE(b->used + 2 <= b->length);
277 cp += b->used;
278 b->used += 2;
291 REQUIRE(b->used - b->current >= 4);
311 REQUIRE(b->used + 4 <= b->length);
314 cp += b->used;
315 b->used += 4;
330 REQUIRE(b->used + length <= b->length);
332 cp = (unsigned char *)b->base + b->used;
334 b->used += length;
345 REQUIRE(b->used - b->current >= length);