From 4a2f88cd1ec1d4e17d79cf63fa6b60d74745d1f6 Mon Sep 17 00:00:00 2001 From: gad Date: Mon, 17 Sep 2001 02:35:34 +0000 Subject: Fix so that lpc's interactive-mode will not be confused by EditLine processing into thinking that there is a print-queue called 'xterm'... Reviewed by: short discussion on freebsd-stable MFC after: 1 week --- usr.sbin/lpr/lpc/lpc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'usr.sbin/lpr') 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); -- cgit v1.1