Lines Matching refs:buf
84 static size_t strip_trailing_whitespace(char *buf, size_t bufl) { in strip_trailing_whitespace() argument
86 while (l-- > 0 && isspace(((unsigned char *)buf)[l])); in strip_trailing_whitespace()
89 buf[bufl] = '\0'; in strip_trailing_whitespace()
94 static size_t handle_line(int type, zval *array, char *buf, size_t bufl) { in handle_line() argument
96 PHPWRITE(buf, bufl); in handle_line()
101 bufl = strip_trailing_whitespace(buf, bufl); in handle_line()
102 add_next_index_stringl(array, buf, bufl); in handle_line()
117 char *buf; in php_exec() local
142 buf = (char *) emalloc(EXEC_INPUT_BUF); in php_exec()
146 b = buf; in php_exec()
151 if (buflen < (bufl + (b - buf) + EXEC_INPUT_BUF)) { in php_exec()
152 bufl += b - buf; in php_exec()
154 buf = erealloc(buf, buflen); in php_exec()
155 b = buf + bufl; in php_exec()
160 } else if (b != buf) { in php_exec()
161 bufl += b - buf; in php_exec()
164 bufl = handle_line(type, array, buf, bufl); in php_exec()
165 b = buf; in php_exec()
168 if (buf != b) { in php_exec()
170 bufl = handle_line(type, array, buf, bufl); in php_exec()
174 bufl = strip_trailing_whitespace(buf, bufl); in php_exec()
175 RETVAL_STRINGL(buf, bufl); in php_exec()
181 while ((read = php_stream_read(stream, buf, EXEC_INPUT_BUF)) > 0) { in php_exec()
182 PHPWRITE(buf, read); in php_exec()
187 efree(buf); in php_exec()