s3-readline: move cmd_history to smbclient, the only user.
authorGünther Deschner <gd@samba.org>
Fri, 1 Oct 2010 08:33:32 +0000 (10:33 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 1 Oct 2010 20:30:22 +0000 (22:30 +0200)
Guenther

source3/client/client.c
source3/include/proto.h
source3/lib/readline.c

index 1432d95c229ab0b98c4a65a1d2f80b839e96e6ba..e79ea16191507bb7b4234a09188379a102b7a4ad 100644 (file)
@@ -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 */
 
index d19ce81a44e5972aa56b35845f5ea110c59ab350..4f4ea996e6a9dae90c40fa9457fdb0cc2aa37c84 100644 (file)
@@ -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  */
 
index 1be0e05f7de90d30ce763eb8cef5af28842cf55e..f20fc0f1dbcbba8fd7ef21b07af7eff10bafc0bc 100644 (file)
@@ -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;
-}