From 405b7d843f9103a29e923892337472e0fd891037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Fri, 1 Oct 2010 10:33:32 +0200 Subject: [PATCH] s3-readline: move cmd_history to smbclient, the only user. Guenther --- source3/client/client.c | 20 ++++++++++++++++++++ source3/include/proto.h | 1 - source3/lib/readline.c | 21 --------------------- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/source3/client/client.c b/source3/client/client.c index 1432d95c229..e79ea161915 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4006,6 +4006,26 @@ int cmd_iosize(void) return 0; } +/**************************************************************************** +history +****************************************************************************/ +static int cmd_history(void) +{ +#if defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_LIST) + HIST_ENTRY **hlist; + int i; + + hlist = history_list(); + + for (i = 0; hlist && hlist[i]; i++) { + DEBUG(0, ("%d: %s\n", i, hlist[i]->line)); + } +#else + DEBUG(0,("no history without readline support\n")); +#endif + + return 0; +} /* Some constants for completing filename arguments */ diff --git a/source3/include/proto.h b/source3/include/proto.h index d19ce81a44e..4f4ea996e6a 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -661,7 +661,6 @@ char *smb_readline(const char *prompt, void (*callback)(void), char **(completion_fn)(const char *text, int start, int end)); const char *smb_readline_get_line_buffer(void); void smb_readline_ca_char(char c); -int cmd_history(void); /* The following definitions come from lib/recvfile.c */ diff --git a/source3/lib/readline.c b/source3/lib/readline.c index 1be0e05f7de..f20fc0f1dbc 100644 --- a/source3/lib/readline.c +++ b/source3/lib/readline.c @@ -172,24 +172,3 @@ void smb_readline_ca_char(char c) rl_completion_append_character = c; #endif } - -/**************************************************************************** -history -****************************************************************************/ -int cmd_history(void) -{ -#if defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_LIST) - HIST_ENTRY **hlist; - int i; - - hlist = history_list(); - - for (i = 0; hlist && hlist[i]; i++) { - DEBUG(0, ("%d: %s\n", i, hlist[i]->line)); - } -#else - DEBUG(0,("no history without readline support\n")); -#endif - - return 0; -}