* guile: fix find-program-in-path

This commit is contained in:
djcb
2012-11-03 11:46:52 +02:00
parent 8505f6c316
commit 49605bc86b

View File

@ -38,16 +38,14 @@ return the file name."
(define (find-program-in-path prog) (define (find-program-in-path prog)
"Find exutable program PROG in PATH; return the full path, or #f if "Find exutable program PROG in PATH; return the full path, or #f if
not found." not found."
(let* ((path (getenv "PATH")) (let* ((path (parse-path (getenv "PATH")))
(progdir (search-path path prog))) (progpath (search-path path prog)))
(if (not prog) (if (not progpath)
#f #f
(let ((fullpath (string-append progdir "/" prog))) (if (access? progpath X_OK) ;; is
(if (access? fullpath X_OK) ;; is progpath
fullpath #f))))
#f))))) 2
(define* (mu:plot-histogram data title x-label y-label #:optional (text-only #f)) (define* (mu:plot-histogram data title x-label y-label #:optional (text-only #f))
"Plot DATA with TITLE, X-LABEL and X-LABEL. If TEXT-ONLY is true, "Plot DATA with TITLE, X-LABEL and X-LABEL. If TEXT-ONLY is true,
display using raw text, otherwise, use a graphical window. DATA is a display using raw text, otherwise, use a graphical window. DATA is a