Description: We need to get termcap info from infocmp not from a file on debian
Author: Peter Van Eynde <pvaneynd@debian.org>
Forwarded: TBD


--- cmucl.orig/src/hemlock/termcap.lisp
+++ cmucl/src/hemlock/termcap.lisp
@@ -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)
