diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-03-19 00:32:16 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-03-19 00:32:16 +0000 |
commit | 4ec971e905cefada5f3980a25781730acdbf4469 (patch) | |
tree | addd2f0b36a9ba3e4680858e0c9f69eac22f69a9 /source/rpcclient | |
parent | 386fdff2dfeaeef60b210ebc0b4d33a6c7b5d5ec (diff) | |
download | samba-4ec971e905cefada5f3980a25781730acdbf4469.tar.gz samba-4ec971e905cefada5f3980a25781730acdbf4469.tar.xz samba-4ec971e905cefada5f3980a25781730acdbf4469.zip |
fixed rpcclient readline code
Diffstat (limited to 'source/rpcclient')
-rw-r--r-- | source/rpcclient/rpcclient.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index 42d9d4e4862..9934808c773 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/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; |