summaryrefslogtreecommitdiff
path: root/source3/lib/readline.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-08 00:08:23 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-08 00:08:23 +0000
commitb36a53b0cb794ad7b620cfa8e794e4149965c15e (patch)
tree877f7cead0ba46ec957efb594a4140a375be321e /source3/lib/readline.c
parent9e8fc1ee4e4dbc6361f6d4a41ab80247e760acb3 (diff)
downloadsamba-b36a53b0cb794ad7b620cfa8e794e4149965c15e.tar.gz
samba-b36a53b0cb794ad7b620cfa8e794e4149965c15e.tar.bz2
samba-b36a53b0cb794ad7b620cfa8e794e4149965c15e.zip
Merge from HEAD - don't mix FILE and X_FILE - fixes debian bug
http://bugs.debian.org/178219 where the first 4096 bytes where being chewed into the FILE buffer, and never available to X_FILE's read. Andrew Bartlett (This used to be commit 8af72c13841ee51bca4f061a91c05e8fd366f586)
Diffstat (limited to 'source3/lib/readline.c')
-rw-r--r--source3/lib/readline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/readline.c b/source3/lib/readline.c
index 58c4ecf482..c0ccf44715 100644
--- a/source3/lib/readline.c
+++ b/source3/lib/readline.c
@@ -56,7 +56,7 @@ static char *smb_readline_replacement(char *prompt, void (*callback)(void),
fd_set fds;
static pstring line;
struct timeval timeout;
- int fd = fileno(stdin);
+ int fd = x_fileno(x_stdin);
char *ret;
x_fprintf(dbf, "%s", prompt);
@@ -70,7 +70,7 @@ static char *smb_readline_replacement(char *prompt, void (*callback)(void),
FD_SET(fd,&fds);
if (sys_select_intr(fd+1,&fds,NULL,NULL,&timeout) == 1) {
- ret = fgets(line, sizeof(line), stdin);
+ ret = x_fgets(line, sizeof(line), x_stdin);
return ret;
}
if (callback)
@@ -86,7 +86,7 @@ char *smb_readline(char *prompt, void (*callback)(void),
char **(completion_fn)(char *text, int start, int end))
{
#if HAVE_LIBREADLINE
- if (isatty(fileno(stdin))) {
+ if (isatty(fileno(x_stdin))) {
char *ret;
/* Aargh! Readline does bizzare things with the terminal width