summaryrefslogtreecommitdiff
path: root/usr.sbin
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.sbin
parent86b4ccfc14fc81f13dd7a4cb9129ccea185dc317 (diff)
New libedit api changes.
Tested by djm@, mouring@, jmc@. ok deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/pppctl/pppctl.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/usr.sbin/ppp/pppctl/pppctl.c b/usr.sbin/ppp/pppctl/pppctl.c
index 555b11c5a25..a0a16f4e89a 100644
--- a/usr.sbin/ppp/pppctl/pppctl.c
+++ b/usr.sbin/ppp/pppctl/pppctl.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pppctl.c,v 1.14 2003/09/07 07:50:29 tedu Exp $
+ * $Id: pppctl.c,v 1.15 2003/10/31 08:48:16 otto Exp $
*/
#include <sys/types.h>
@@ -398,10 +398,7 @@ main(int argc, char **argv)
History *hist;
const char *l, *env;
int size;
-#ifdef __NetBSD__
HistEvent hev = { 0, "" };
-#endif
-
hist = history_init();
if ((env = getenv("EL_SIZE"))) {
@@ -410,13 +407,8 @@ main(int argc, char **argv)
size = 20;
} else
size = 20;
-#ifdef __NetBSD__
history(hist, &hev, H_SETSIZE, size);
edit = el_init("pppctl", stdin, stdout, stderr);
-#else
- history(hist, H_EVENT, size);
- edit = el_init("pppctl", stdin, stdout);
-#endif
el_source(edit, NULL);
el_set(edit, EL_PROMPT, GetPrompt);
if ((env = getenv("EL_EDITOR"))) {
@@ -429,11 +421,7 @@ main(int argc, char **argv)
el_set(edit, EL_HIST, history, (const char *)hist);
while ((l = smartgets(edit, &len, fd))) {
if (len > 1)
-#ifdef __NetBSD__
history(hist, &hev, H_ENTER, l);
-#else
- history(hist, H_ENTER, l);
-#endif
write(fd, l, len);
if (Receive(fd, REC_SHOW) != 0)
break;