Skip to content
Browse files

* guile: fix find-program-in-path

  • Loading branch information...
1 parent 8505f6c commit 49605bc86b835bca667fad0a5de46cd5ddbcfec0 @djcb committed Nov 3, 2012
Showing with 7 additions and 9 deletions.
  1. +7 −9 guile/mu/plot.scm
View
16 guile/mu/plot.scm
@@ -38,16 +38,14 @@ return the file name."
(define (find-program-in-path prog)
"Find exutable program PROG in PATH; return the full path, or #f if
not found."
- (let* ((path (getenv "PATH"))
- (progdir (search-path path prog)))
- (if (not prog)
+ (let* ((path (parse-path (getenv "PATH")))
+ (progpath (search-path path prog)))
+ (if (not progpath)
#f
- (let ((fullpath (string-append progdir "/" prog)))
- (if (access? fullpath X_OK) ;; is
- fullpath
- #f)))))
-
-
+ (if (access? progpath X_OK) ;; is
+ progpath
+ #f))))
+2
(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,
display using raw text, otherwise, use a graphical window. DATA is a

0 comments on commit 49605bc

Please sign in to comment.
Something went wrong with that request. Please try again.