Lines Matching refs:count
1308 unsigned count; in get_line() local
1311 count = 0; in get_line()
1326 iobuf[count] = c; in get_line()
1327 if (count < (IOBUF_SIZE - 1)) /* check overflow */ in get_line()
1328 count++; in get_line()
1331 iobuf[count] = '\0'; in get_line()
1332 return count; in get_line()
1344 int count; in cgi_io_loop_and_exit() local
1402 count = safe_poll(pfd, hdr_cnt > 0 ? TO_CGI+1 : FROM_CGI+1, -1); in cgi_io_loop_and_exit()
1403 if (count <= 0) { in cgi_io_loop_and_exit()
1421 count = safe_write(toCgi_wr, hdr_ptr, hdr_cnt); in cgi_io_loop_and_exit()
1426 if (count > 0) { in cgi_io_loop_and_exit()
1427 hdr_ptr += count; in cgi_io_loop_and_exit()
1428 hdr_cnt -= count; in cgi_io_loop_and_exit()
1442 count = safe_read(STDIN_FILENO, hdr_buf, sizeof_hdr_buf); in cgi_io_loop_and_exit()
1443 if (count > 0) { in cgi_io_loop_and_exit()
1444 hdr_cnt = count; in cgi_io_loop_and_exit()
1446 post_len -= count; in cgi_io_loop_and_exit()
1471 count = safe_read(fromCgi_rd, rbuf + out_cnt, IOBUF_SIZE - 8); in cgi_io_loop_and_exit()
1472 if (count <= 0) { in cgi_io_loop_and_exit()
1481 out_cnt += count; in cgi_io_loop_and_exit()
1482 count = 0; in cgi_io_loop_and_exit()
1490 count = out_cnt - 8; in cgi_io_loop_and_exit()
1508 count = out_cnt; in cgi_io_loop_and_exit()
1512 count = safe_read(fromCgi_rd, rbuf, IOBUF_SIZE); in cgi_io_loop_and_exit()
1513 if (count <= 0) in cgi_io_loop_and_exit()
1516 if (full_write(STDOUT_FILENO, rbuf, count) != count) in cgi_io_loop_and_exit()
1518 dbg("cgi read %d bytes: '%.*s'\n", count, count, rbuf); in cgi_io_loop_and_exit()
1743 ssize_t count; in send_file_and_exit() local
1894 count = sendfile(STDOUT_FILENO, fd, &offset, sz); in send_file_and_exit()
1895 if (count < 0) { in send_file_and_exit()
1900 IF_FEATURE_HTTPD_RANGES(range_len -= count;) in send_file_and_exit()
1901 if (count == 0 || range_len == 0) in send_file_and_exit()
1906 while ((count = safe_read(fd, iobuf, IOBUF_SIZE)) > 0) { in send_file_and_exit()
1908 IF_FEATURE_HTTPD_RANGES(if (count > range_len) count = range_len;) in send_file_and_exit()
1909 n = full_write(STDOUT_FILENO, iobuf, count); in send_file_and_exit()
1910 if (count != n) in send_file_and_exit()
1912 IF_FEATURE_HTTPD_RANGES(range_len -= count;) in send_file_and_exit()
1916 if (count < 0) { in send_file_and_exit()