1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-25 22:56:14 +00:00

Remove readline support from nslookup.

OK millert, deraadt
This commit is contained in:
florian
2020-01-09 18:25:49 +00:00
parent efcc66dac0
commit 3003050ebb

View File

@@ -42,22 +42,6 @@
#include <dig/dig.h>
#if defined(HAVE_READLINE)
#if defined(HAVE_EDIT_READLINE_READLINE_H)
#include <edit/readline/readline.h>
#if defined(HAVE_EDIT_READLINE_HISTORY_H)
#include <edit/readline/history.h>
#endif
#elif defined(HAVE_EDITLINE_READLINE_H)
#include <editline/readline.h>
#elif defined(HAVE_READLINE_READLINE_H)
#include <readline/readline.h>
#if defined (HAVE_READLINE_HISTORY_H)
#include <readline/history.h>
#endif
#endif
#endif
static isc_boolean_t short_form = ISC_TRUE,
tcpmode = ISC_FALSE,
identify = ISC_FALSE, stats = ISC_TRUE,
@@ -789,15 +773,9 @@ get_next_command(void) {
fatal("memory allocation failure");
isc_app_block();
if (interactive) {
#ifdef HAVE_READLINE
ptr = readline("> ");
if (ptr != NULL)
add_history(ptr);
#else
fputs("> ", stderr);
fflush(stderr);
ptr = fgets(buf, COMMSIZE, stdin);
#endif
} else
ptr = fgets(buf, COMMSIZE, stdin);
isc_app_unblock();
@@ -805,10 +783,6 @@ get_next_command(void) {
in_use = ISC_FALSE;
} else
do_next_command(ptr);
#ifdef HAVE_READLINE
if (interactive)
free(ptr);
#endif
isc_mem_free(mctx, buf);
}