summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2001-09-17 02:35:34 +0000
committergad <gad@FreeBSD.org>2001-09-17 02:35:34 +0000
commit4a2f88cd1ec1d4e17d79cf63fa6b60d74745d1f6 (patch)
tree50f220f9e5c38048d4f1760c02a822ab5cd65e1e /usr.sbin/lpr
parentd63abdd30364179bb725880f93e2532205e4bc5a (diff)
downloadFreeBSD-src-4a2f88cd1ec1d4e17d79cf63fa6b60d74745d1f6.zip
FreeBSD-src-4a2f88cd1ec1d4e17d79cf63fa6b60d74745d1f6.tar.gz
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
Diffstat (limited to 'usr.sbin/lpr')
-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