diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-10-31 08:44:08 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-10-31 08:44:08 +0000 |
commit | 86b4ccfc14fc81f13dd7a4cb9129ccea185dc317 (patch) | |
tree | 3a0a6e9e22e1804ecf2332da5e93704ab0036a51 /sbin/fsdb | |
parent | 6ff1c1765c2b4495f0292fe730d9bb9a5daef063 (diff) |
New libedit api changes.
Tested by djm@, mouring@, jmc@.
ok deraadt@
Diffstat (limited to 'sbin/fsdb')
-rw-r--r-- | sbin/fsdb/fsdb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index 0cb330839f7..4e3b751ac7b 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fsdb.c,v 1.16 2003/09/26 16:09:27 deraadt Exp $ */ +/* $OpenBSD: fsdb.c,v 1.17 2003/10/31 08:44:07 otto Exp $ */ /* $NetBSD: fsdb.c,v 1.7 1997/01/11 06:50:53 lukem Exp $ */ /*- @@ -38,7 +38,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: fsdb.c,v 1.16 2003/09/26 16:09:27 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: fsdb.c,v 1.17 2003/10/31 08:44:07 otto Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -229,15 +229,16 @@ cmdloop(void) struct cmdtable *cmdp; History *hist; EditLine *elptr; + HistEvent hev; curinode = ginode(ROOTINO); curinum = ROOTINO; printactive(); hist = history_init(); - history(hist, H_EVENT, 100); /* 100 elt history buffer */ + history(hist, &hev, H_SETSIZE, 100); /* 100 elt history buffer */ - elptr = el_init(__progname, stdin, stdout); + elptr = el_init(__progname, stdin, stdout, stderr); el_set(elptr, EL_EDITOR, "emacs"); el_set(elptr, EL_PROMPT, prompt); el_set(elptr, EL_HIST, history, hist); @@ -247,7 +248,7 @@ cmdloop(void) if (debug) printf("command `%s'\n", line); - history(hist, H_ENTER, elline); + history(hist, &hev, H_ENTER, elline); line = strdup(elline); if (line == NULL) @@ -258,7 +259,7 @@ cmdloop(void) * el_parse returns -1 to signal that it's not been handled * internally. */ - if (el_parse(elptr, cmd_argc, cmd_argv) != -1) + if (el_parse(elptr, cmd_argc, (const char **)cmd_argv) != -1) continue; known = 0; for (cmdp = cmds; cmdp->cmd; cmdp++) { |