Lines Matching refs:linebuf
67 char linebuf[LINESIZE];
103 while ((n = getln(linebuf, sizeof (linebuf), ibuf)) > 0) {
108 hdr = inhead && (headerp(linebuf) ||
109 (linebuf[0] == ' ' || linebuf[0] == '\t'));
117 if (fwrite(linebuf, 1, (int)clen, otf) !=
122 l += linecount(linebuf, clen);
128 memcpy(linebuf, linebuf+clen, n+1);
136 if (n == 1 && linebuf[0] == '\n') {
145 if (fwrite(linebuf, 1, n, otf) != n) {
149 l += linecount(linebuf, n);
155 n = clen < sizeof (linebuf) ?
156 (int)clen : (int)sizeof (linebuf);
157 if ((n = fread(linebuf, 1, n, ibuf)) <= 0) {
179 if (blankline && linebuf[0] == 'F' && is_headline(linebuf)) {
235 if ((linebuf[1] == 't' || linebuf[1] == 'T') &&
236 ishfield(linebuf, "status")) {
237 cp = hcontents(linebuf);
248 if (linebuf[7] == '-') {
249 if (ishfield(linebuf, "content-length")) {
251 clen = atol(hcontents(linebuf));
254 } else if (ishfield(linebuf, "content-type")) {
258 cp = hcontents(linebuf);
270 if (fwrite(linebuf, 1, n, otf) != n) {
284 if (linebuf[n-1] == '\n') {
398 readline(FILE *ibuf, char *linebuf)
406 for (cp = linebuf; c != '\n' && c != EOF; c = getc(ibuf)) {
415 if (cp - linebuf < LINESIZE-2)
419 if (c == EOF && cp == linebuf)
421 return (cp - linebuf + 1);