summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/lpc/lpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/lpr/lpc/lpc.c')
-rw-r--r--usr.sbin/lpr/lpc/lpc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr.sbin/lpr/lpc/lpc.c b/usr.sbin/lpr/lpc/lpc.c
index d5a1160..5c890f4 100644
--- a/usr.sbin/lpr/lpc/lpc.c
+++ b/usr.sbin/lpr/lpc/lpc.c
@@ -169,6 +169,15 @@ cmdscanner(void)
el_set(el, EL_PROMPT, lpc_prompt);
el_set(el, EL_SIGNAL, 1);
el_source(el, NULL);
+ /*
+ * EditLine init may call 'cgetset()' to set a
+ * capability-db meant for termcap (eg: to set
+ * terminal type 'xterm'). Reset that now, or
+ * that same db-information will be used for
+ * printcap (giving us an "xterm" printer, with
+ * all kinds of invalid capabilities...).
+ */
+ cgetset(NULL);
}
if ((bp = el_gets(el, &num)) == NULL || num == 0)
quit(0, NULL);
OpenPOWER on IntegriCloud