Lines Matching refs:buf_len
91 bool bc_read_buf(BcVec *vec, char *buf, size_t *buf_len) { in bc_read_buf() argument
96 if (!*buf_len) return false; in bc_read_buf()
107 nllen = *buf_len >= nllen ? nllen : *buf_len; in bc_read_buf()
112 *buf_len -= nllen; in bc_read_buf()
113 memmove(buf, nl + 1, *buf_len + 1); in bc_read_buf()
119 bc_vec_npush(vec, *buf_len, buf); in bc_read_buf()
120 *buf_len = 0; in bc_read_buf()
143 if (bc_read_buf(vec, vm.buf, &vm.buf_len)) { in bc_read_chars()
156 r = read(STDIN_FILENO, vm.buf + vm.buf_len, in bc_read_chars()
157 BC_VM_STDIN_BUF_SIZE - vm.buf_len); in bc_read_chars()
202 vm.buf_len += (size_t) r; in bc_read_chars()
203 vm.buf[vm.buf_len] = '\0'; in bc_read_chars()
206 done = bc_read_buf(vec, vm.buf, &vm.buf_len); in bc_read_chars()