#include <locale.h>
#include <assert.h>
#include <stdarg.h>
+#include <inttypes.h>
#include <getopt.h>
#include <gettext.h>
printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
}
+static int do_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));
+ return 0;
+ }
+
+ return rc;
+}
+
static int do_readline(char **linebuf, size_t *n, bool batch)
{
#if !HAVE_READLINE