Lines Matching defs:lineptr
894 char *lineptr;
900 lineptr = line;
902 lineptr += 26;
904 /* lineptr[0..linemax-1] - buffer for stdin */
908 np = memRchr(lineptr, '\n', stdin_cnt);
912 i = buffer_pread(0, lineptr + stdin_cnt, i);
916 np = memRchr(lineptr + stdin_cnt, '\n', i);
927 print_to_nl: /* NB: starting from here lineptr may point
929 linelen = np - lineptr + 1;
932 ch = lineptr[linelen-1];
939 /* write out lineptr[0..linelen-1] to each log destination
940 * (or lineptr[-26..linelen-1] if timestamping) */
942 printptr = lineptr;
960 fwrite(lineptr, 1, linelen, stderr);
968 /* lineptr is emptied now, safe to use as buffer */
969 stdin_cnt = exitasap ? -1 : buffer_pread(0, lineptr, linemax);
972 lineptr[0] = ch = '\n';
977 np = memRchr(lineptr, '\n', stdin_cnt);
979 linelen = np - lineptr + 1;
980 ch = lineptr[linelen-1];
986 ////full_write(2, lineptr, linelen);
987 fwrite(lineptr, 1, linelen, stderr);
989 buffer_pwrite(i, lineptr, linelen);
995 lineptr += linelen;
998 np = memRchr(lineptr, '\n', stdin_cnt);
1002 memmove((timestamp ? line+26 : line), lineptr, stdin_cnt);