--- src/usr.sbin/cdcontrol/cdcontrol.c 2005/11/13 11:58:31 1.9 +++ src/usr.sbin/cdcontrol/cdcontrol.c 2006/01/14 22:58:17 1.10 @@ -1147,6 +1147,7 @@ input(int *cmd) #define MAXLINE 80 static EditLine *el = NULL; static History *hist = NULL; + static HistEvent he; static char buf[MAXLINE]; int num = 0; int len; @@ -1158,7 +1159,7 @@ input(int *cmd) if (!el) { el = el_init("cdcontrol", stdin, stdout, stderr); hist = history_init(); - history(hist, NULL, H_SETSIZE, 100); + history(hist, &he, H_SETSIZE, 100); el_set(el, EL_HIST, history, hist); el_set(el, EL_EDITOR, "emacs"); el_set(el, EL_PROMPT, cdcontrol_prompt); @@ -1174,7 +1175,7 @@ input(int *cmd) len = (num > MAXLINE) ? MAXLINE : num; memcpy(buf, bp, len); buf[len] = 0; - history(hist, NULL, H_ENTER, bp); + history(hist, &he, H_ENTER, bp); #undef MAXLINE } else {