43 if (*buf == NULL || *bufsiz == 0) {
45 if ((*buf = raw_malloc(*bufsiz)) == NULL)
49 for (ptr = *buf, eptr = *buf + *bufsiz;;) {
53 ssize_t diff = (ssize_t)(ptr - *buf);
66 if (ptr + 2 >= eptr) {
68 size_t nbufsiz = *bufsiz * 2;
69 ssize_t d = ptr - *buf;
70 if (nbufsiz < *bufsiz ||
71 (nbuf = raw_realloc(*buf, nbufsiz)) == NULL)
75 eptr = nbuf + nbufsiz;
ssize_t compat_getdelim_(char **lineptr, size_t *n, int delim, FILE *stream)