summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2001-10-01 08:46:45 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2001-10-01 08:46:45 +0000
commitdbb3c034a4fe23c245d778984805a627ebe978d3 (patch)
tree7327909e73715f72fd45da9db34dd2c1e6c8aeb9 /usr.bin/ftp
parent757eeda04b7393e24464dd8ec3a823b046eeb561 (diff)
downloadsrc-test2-dbb3c034a4fe23c245d778984805a627ebe978d3.tar.gz
src-test2-dbb3c034a4fe23c245d778984805a627ebe978d3.zip
Notes
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r--usr.bin/ftp/ftp_var.h1
-rw-r--r--usr.bin/ftp/main.c2
-rw-r--r--usr.bin/ftp/util.c5
3 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ftp/ftp_var.h b/usr.bin/ftp/ftp_var.h
index c13b32ca27ea..a906ca8e9b99 100644
--- a/usr.bin/ftp/ftp_var.h
+++ b/usr.bin/ftp/ftp_var.h
@@ -127,6 +127,7 @@ int try_epsv; /* try EPSV for this session */
int editing; /* command line editing enabled */
EditLine *el; /* editline(3) status structure */
History *hist; /* editline(3) history structure */
+HistEvent he; /* editline(3) history structure */
char *cursor_pos; /* cursor position we're looking for */
size_t cursor_argc; /* location of cursor in margv */
size_t cursor_argo; /* offset of cursor in margv[cursor_argc] */
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c
index 3ded48df33f6..b5bfc6f4b859 100644
--- a/usr.bin/ftp/main.c
+++ b/usr.bin/ftp/main.c
@@ -408,7 +408,7 @@ cmdscanner(top)
}
memcpy(line, buf, num);
line[num] = '\0';
- history(hist, H_ENTER, buf);
+ history(hist, &he, H_ENTER, buf);
}
#endif /* !SMALL */
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c
index 687a84c7de58..00bb9d2704dd 100644
--- a/usr.bin/ftp/util.c
+++ b/usr.bin/ftp/util.c
@@ -839,9 +839,10 @@ void
controlediting()
{
if (editing && el == NULL && hist == NULL) {
- el = el_init(__progname, stdin, stdout); /* init editline */
+ /* init editline */
+ el = el_init(__progname, stdin, stdout, stderr);
hist = history_init(); /* init the builtin history */
- history(hist, H_EVENT, 100); /* remember 100 events */
+ history(hist, &he, H_EVENT, 100); /* remember 100 events */
el_set(el, EL_HIST, history, hist); /* use history */
el_set(el, EL_EDITOR, "emacs"); /* default editor is emacs */