1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: We need to get termcap info from infocmp not from a file on debian
Author: Peter Van Eynde <pvaneynd@debian.org>
Forwarded: TBD
Index: b/src/hemlock/termcap.lisp
===================================================================
--- a/src/hemlock/termcap.lisp 2011-12-06 09:05:31.531799980 +0000
+++ b/src/hemlock/termcap.lisp 2011-12-06 09:05:40.788425823 +0000
@@ -39,10 +39,18 @@
(with-input-from-string (s termcap-env-var)
(skip-termcap-names s)
(parse-fields s)))
- (with-open-file (s termcap-file)
- (if (find-termcap-entry name s)
+ (let* ((proc
+ (ext:run-program "/usr/bin/infocmp"
+ (list (cdr (assoc :TERM *ENVIRONMENT-LIST*)))
+ :wait nil
+ :input nil
+ :output :stream))
+ (s (process-output proc)))
+ (unwind-protect
+ (if (find-termcap-entry name s)
(parse-fields s)
- (error "Unknown Terminal ~S in file ~S." name termcap-file))))))
+ (error "Unknown Terminal ~S in file ~S." name termcap-file))
+ (process-close proc))))))
(declaim (inline termcap))
(defun termcap (name termcap)
|