Lines Matching refs:off
44 size_t off; /* current offset into the buffer */
91 ck->off = 0;
130 ck->off = ck->len = strnlen(ck->buf, ck->size);
156 * Turn off buffering, so a write past the end of the buffer
169 if (nbytes > ck->len - ck->off)
170 nbytes = ck->len - ck->off;
175 memcpy(buf, ck->buf + ck->off, nbytes);
177 ck->off += nbytes;
187 if (nbytes > ck->size - ck->off)
188 nbytes = ck->size - ck->off;
193 memcpy(ck->buf + ck->off, buf, nbytes);
195 ck->off += nbytes;
197 if (ck->off > ck->len)
198 ck->len = ck->off;
206 if (!ck->bin && ck->off < ck->size && ck->buf[ck->off - 1] != '\0')
207 ck->buf[ck->off] = '\0';
224 ck->off = offset;
228 if (ck->off + offset > ck->size) {
232 ck->off += offset;
240 ck->off = ck->len + offset;
248 return (ck->off);