Lines Matching refs:used

28  *    subregions. The used region and the available region are disjoint, and
29 * their union is the buffer's region. The used region extends from the
30 * beginning of the buffer region to the last used byte. The available
31 * region extends from one byte greater than the last used byte to the
32 * end of the buffer's region. The size of the used region can be changed
33 * using various buffer commands. Initially, the used region is empty.
35 * The used region is further subdivided into two disjoint regions: the
37 * regions is the used region. The consumed region extends from the
38 * beginning of the used region to the byte before the current offset (if
39 * any). The remaining region the current pointer to the end of the used
52 * /----- used region -----\\/-- available --\\
61 * d == used pointer.
65 * a-d == used region.
79 * respectively increase and decrease the used space in buffer *b by n
82 * allocate or deallocate memory. They just change the value of used.
85 * used , current and active to zero.
132 b->used = 0;
147 b->used = 0;
152 /* Increase the 'used' region of 'b' by 'n' bytes. */
158 REQUIRE(b->used + n <= b->length);
160 b->used += n;
163 /* Decrease the 'used' region of 'b' by 'n' bytes. */
169 REQUIRE(b->used >= n);
171 b->used -= n;
172 if (b->current > b->used)
173 b->current = b->used;
174 if (b->active > b->used)
175 b->active = b->used;
178 /* Make the used region empty. */
185 b->used = 0;
206 REQUIRE(b->current + n <= b->used);
231 REQUIRE(b->used - b->current >= 1);
248 REQUIRE(b->used + 1 <= b->length);
251 cp += b->used;
252 b->used += 1;
265 REQUIRE(b->used - b->current >= 2);
283 REQUIRE(b->used + 2 <= b->length);
286 cp += b->used;
287 b->used += 2;
300 REQUIRE(b->used - b->current >= 4);
320 REQUIRE(b->used + 4 <= b->length);
323 cp += b->used;
324 b->used += 4;
339 REQUIRE(b->used + length <= b->length);
341 cp = (unsigned char *)b->base + b->used;
343 b->used += length;
354 REQUIRE(b->used - b->current >= length);