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)
