Lines Matching defs:linebuf
66 char linebuf[LINESIZE], pathbuf[PATHSIZE];
98 if (fgets(linebuf, sizeof(linebuf), ibuf) == NULL) {
104 count = strlen(linebuf);
109 if (count >= 2 && linebuf[count - 1] == '\n' &&
110 linebuf[count - 2] == '\r') {
112 linebuf[count - 1] = '\n';
115 (void)fwrite(linebuf, sizeof(*linebuf), count, otf);
119 linebuf[count - 1] = '\0';
120 if (maybe && linebuf[0] == 'F' && ishead(linebuf)) {
130 } else if (linebuf[0] == 0) {
133 for (cp = linebuf, cp2 = "status";; cp++) {
154 maybe = linebuf[0] == 0;
164 putline(FILE *obuf, char *linebuf, int outlf)
168 c = strlen(linebuf);
169 (void)fwrite(linebuf, sizeof(*linebuf), c, obuf);
185 readline(FILE *ibuf, char *linebuf, int linesize)
190 if (fgets(linebuf, linesize, ibuf) == NULL)
192 n = strlen(linebuf);
193 if (n > 0 && linebuf[n - 1] == '\n')
194 linebuf[--n] = '\0';
195 if (n > 0 && linebuf[n - 1] == '\r')
196 linebuf[--n] = '\0';