summaryrefslogtreecommitdiff
path: root/source3/rpcclient/rpcclient.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-03-19 00:32:16 +0000
committerAndrew Tridgell <tridge@samba.org>2001-03-19 00:32:16 +0000
commit62711a9ceb375fef2c0af0f649d8c77eb94483f9 (patch)
tree95da07c42da5cd782c7db3272da490204db2975c /source3/rpcclient/rpcclient.c
parente17e7b64175dcfc9963405a9fa3724f8d7097d89 (diff)
downloadsamba-62711a9ceb375fef2c0af0f649d8c77eb94483f9.tar.gz
samba-62711a9ceb375fef2c0af0f649d8c77eb94483f9.tar.bz2
samba-62711a9ceb375fef2c0af0f649d8c77eb94483f9.zip
fixed rpcclient readline code
(This used to be commit 4ec971e905cefada5f3980a25781730acdbf4469)
Diffstat (limited to 'source3/rpcclient/rpcclient.c')
-rw-r--r--source3/rpcclient/rpcclient.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 42d9d4e486..9934808c77 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -455,11 +455,6 @@ static void usage(char *pname)
charset_initialise();
setlinebuf(stdout);
-#ifdef HAVE_LIBREADLINE
- /* Allow conditional parsing of the ~/.inputrc file. */
- rl_readline_name = "rpcclient";
-#endif
-
DEBUGLEVEL = 1;
/* Parse options */
@@ -610,24 +605,16 @@ static void usage(char *pname)
/* Loop around accepting commands */
while(1) {
pstring prompt, cmd;
+ char *line;
uint32 result;
ZERO_STRUCT(cmd);
slprintf(prompt, sizeof(prompt) - 1, "rpcclient $> ");
-#if HAVE_READLINE
- cmd = readline(prompt);
-#else
- printf("%s", prompt);
-
- if (!fgets(cmd, sizeof(cmd) - 1, stdin)) {
- break;
- }
+ line = smb_readline(prompt, NULL, NULL);
- cmd[strlen(cmd) - 1] = '\0';
-#endif
- result = process_cmd(&cli, cmd);
+ result = process_cmd(&cli, line);
}
return 0;