aboutsummaryrefslogtreecommitdiffstats
path: root/plpftp
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2007-12-07 22:07:37 +0000
committerReuben Thomas <rrt@sc3d.org>2007-12-07 22:07:37 +0000
commit6552c17a058165061a0ad9271b9178d2e593f651 (patch)
tree000117911f9cb3d9fecaf238439f4ebb93774250 /plpftp
parent31a65bcab58968b635c391bd21a0b8e37a2d473c (diff)
downloadplptools-6552c17a058165061a0ad9271b9178d2e593f651.tar.gz
plptools-6552c17a058165061a0ad9271b9178d2e593f651.tar.bz2
plptools-6552c17a058165061a0ad9271b9178d2e593f651.zip
Remove unused m4 tests, and test for readline version; we should all
be using at least 4.2 by now.
Diffstat (limited to 'plpftp')
-rw-r--r--plpftp/ftp.cc34
1 files changed, 0 insertions, 34 deletions
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;