summaryrefslogtreecommitdiff
path: root/usr.bin/cdio
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2003-10-31 08:48:17 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2003-10-31 08:48:17 +0000
commit94d0072cb5856c2cb998567132dcf66cbcac9fba (patch)
tree02059687cccd68c5564a59aa524b5dbdd0745b37 /usr.bin/cdio
parent86b4ccfc14fc81f13dd7a4cb9129ccea185dc317 (diff)
New libedit api changes.
Tested by djm@, mouring@, jmc@. ok deraadt@
Diffstat (limited to 'usr.bin/cdio')
-rw-r--r--usr.bin/cdio/cdio.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/cdio/cdio.c b/usr.bin/cdio/cdio.c
index 167bf24806d..1066fe9152a 100644
--- a/usr.bin/cdio/cdio.c
+++ b/usr.bin/cdio/cdio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdio.c,v 1.30 2003/06/10 22:20:45 deraadt Exp $ */
+/* $OpenBSD: cdio.c,v 1.31 2003/10/31 08:47:31 otto Exp $ */
/* Copyright (c) 1995 Serge V. Vakulenko
* All rights reserved.
@@ -1242,6 +1242,7 @@ input(int *cmd)
char *buf;
int siz = 0;
char *p;
+ HistEvent hev;
do {
if ((buf = (char *) el_gets(el, &siz)) == NULL || !siz) {
@@ -1250,7 +1251,7 @@ input(int *cmd)
return (0);
}
if (strlen(buf) > 1)
- history(hist, H_ENTER, buf);
+ history(hist, &hev, H_ENTER, buf);
p = parse(buf, cmd);
} while (!p);
return (p);
@@ -1359,10 +1360,12 @@ prompt(void)
void
switch_el(void)
{
+ HistEvent hev;
+
if (el == NULL && hist == NULL) {
- el = el_init(__progname, stdin, stdout);
+ el = el_init(__progname, stdin, stdout, stderr);
hist = history_init();
- history(hist, H_EVENT, 100);
+ history(hist, &hev, H_SETSIZE, 100);
el_set(el, EL_HIST, history, hist);
el_set(el, EL_EDITOR, "emacs");
el_set(el, EL_PROMPT, prompt);