+
+int test_getline(char **linebuf, size_t *n)
+{
+ int rc;
+
+ if ((rc = dx_getline(linebuf, n, stdin)) < 0) {
+ if (rc == DX_GETLINE_ENOMEM)
+ print_error("%s", _("failed to allocate memory"));
+ else
+ print_error("%s", strerror(errno));
+ abort();
+ }
+
+ return rc;
+}