-static int do_getline(char **linebuf, size_t *n)
-{
- ssize_t rc;
-
- if ((rc = getline(linebuf, n, stdin)) < 0) {
- if (ferror(stdin))
- print_error("%s", strerror(errno));
- return 0;
- }
-
- if (rc-- && (*linebuf)[rc] == '\n')
- (*linebuf)[rc] = '\0';
- return 1;
-}
-