From 6552c17a058165061a0ad9271b9178d2e593f651 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Fri, 7 Dec 2007 22:07:37 +0000 Subject: Remove unused m4 tests, and test for readline version; we should all be using at least 4.2 by now. --- plpftp/ftp.cc | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'plpftp') diff --git a/plpftp/ftp.cc b/plpftp/ftp.cc index 4f7d31c..a09751a 100644 --- a/plpftp/ftp.cc +++ b/plpftp/ftp.cc @@ -1455,15 +1455,9 @@ session(rfsv & a, rpcs & r, rclip & rc, ppsocket & rclipSocket, int xargc, char } #if HAVE_LIBREADLINE -#if (READLINE_VERSION >= 402) #define FUNCAST(f) f #define CPFUNCAST(f) f #define MATCHFUNCTION rl_completion_matches -#else -#define FUNCAST(f) (Function *)f -#define CPFUNCAST(f) (CPPFunction *)f -#define MATCHFUNCTION completion_matches -#endif static const char *all_commands[] = { "pwd", "ren", "touch", "gtime", "test", "gattr", "sattr", "devs", @@ -1487,11 +1481,7 @@ static char cplPath[1024]; static char* filename_generator( -#if (READLINE_VERSION >= 402) const char *text, -#else - char *text, -#endif int state) { static int len; @@ -1530,11 +1520,7 @@ filename_generator( static char * command_generator( -#if (READLINE_VERSION >= 402) const char *text, -#else - char *text, -#endif int state) { static int idx, len; @@ -1552,15 +1538,9 @@ command_generator( return NULL; } -#if (READLINE_VERSION >= 402) static char * null_completion(const char *, int) { return ""; } -#else -static int null_completion() { - return 0; -} -#endif static char ** do_completion(const char *text, int start, int end) @@ -1569,18 +1549,11 @@ do_completion(const char *text, int start, int end) rl_completion_entry_function = FUNCAST(null_completion); rl_completion_append_character = ' '; -#if (READLINE_VERSION >= 402) rl_attempted_completion_over = 1; -#endif if (start == 0) { #if HAVE_LIBREADLINE -# if (READLINE_VERSION >= 402) matches = MATCHFUNCTION(text, command_generator); -# else - char* txt = (char*)text; - matches = MATCHFUNCTION(txt, (CPFunction*)command_generator); -# endif #endif } else { @@ -1611,14 +1584,7 @@ do_completion(const char *text, int start, int end) } #if HAVE_LIBREADLINE -# if (READLINE_VERSION >= 402) matches = MATCHFUNCTION(text, filename_generator); -# else - { - char* txt = (char*)text; - matches = MATCHFUNCTION(txt, (CPFunction*)filename_generator); - } -# endif #endif } return matches; -- cgit v1.2.3