commit 86ba454213bfee77bd74411bb1417e8634fdfdcd from: Omar Polo date: Sun Jan 09 17:39:47 2022 UTC revert the readline workaround commit - ba8b636b4d90e2197c7ea1949b7be79f9d1f1d89 commit + 86ba454213bfee77bd74411bb1417e8634fdfdcd blob - 690778f94a83a991200822a1c38328ca1cbbe480 blob + 16c2148ba9b4b560dcccba205a1395e1a88f2537 --- kamiftp/Makefile +++ kamiftp/Makefile @@ -8,7 +8,7 @@ MAN= kamiftp.1 CPPFLAGS= -I${.CURDIR}/../lib -I${.CURDIR} -LDADD+= -levent -lutil -ltls +LDADD+= -levent -lutil -ltls -lreadline DPADD+= ${LIBEVENT} ${LIBUTIL} ${LIBTLS} .if ${KAMID_RELEASE} != Yes blob - 8dd79f8941e896cd85d3f57cd9d5cb8a9d6af4a3 blob + 186902f6c09f87dfd6fbbe1ee59bc283ee986c5a --- kamiftp/ftp.c +++ kamiftp/ftp.c @@ -35,10 +35,8 @@ #include #include -#if HAVE_LIBREADLINE #include #include -#endif #ifndef nitems #define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) @@ -90,7 +88,6 @@ int pwdfid; #define ASSERT_EMPTYBUF() assert(EVBUFFER_LENGTH(buf) == 0) -#if HAVE_LIBREADLINE static char * read_line(const char *prompt) { @@ -108,27 +105,7 @@ again: add_history(line); return line; } -#else -static char * -read_line(const char *prompt) -{ - char *ch, *line = NULL; - size_t linesize = 0; - ssize_t linelen; - printf("%s", prompt); - fflush(stdout); - - linelen = getline(&line, &linesize, stdin); - if (linelen == -1) - return NULL; - - if ((ch = strchr(line, '\n')) != NULL) - *ch = '\0'; - return line; -} -#endif - static void tty_resized(int signo) {