mirror of
https://github.com/false-schemers/skint.git
synced 2025-01-13 20:03:30 +01:00
minor fix in lib search
This commit is contained in:
parent
43baec6704
commit
9dc95e1fce
2 changed files with 7 additions and 8 deletions
|
@ -1418,7 +1418,7 @@
|
|||
|
||||
; hacks for locating library files
|
||||
|
||||
(define *library-path-list* '())
|
||||
(define *library-path-list* '("./"))
|
||||
|
||||
(define (add-library-path! path)
|
||||
(if (base-path-separator path)
|
||||
|
@ -1427,10 +1427,9 @@
|
|||
|
||||
(define (find-library-path libname) ;=> name of existing .sld file or #f
|
||||
(let loop ([l *library-path-list*])
|
||||
(if (null? l)
|
||||
#f
|
||||
(let ([p (listname->path libname (car l) ".sld")])
|
||||
(if (and p (file-exists? p)) p (loop (cdr l)))))))
|
||||
(and (pair? l)
|
||||
(let ([p (listname->path libname (car l) ".sld")])
|
||||
(if (and p (file-exists? p)) p (loop (cdr l)))))))
|
||||
|
||||
#;(define (resolve-input-file/lib-name name) ;=> path (or error is signalled)
|
||||
(define filepath
|
||||
|
|
6
t.c
6
t.c
|
@ -748,7 +748,7 @@ char *t_code[] = {
|
|||
"th)[22}.!0.0^_1[42",
|
||||
|
||||
"C", 0,
|
||||
"n@!(y19:*library-path-list*)",
|
||||
"'(l1:s2:./;)@!(y19:*library-path-list*)",
|
||||
|
||||
"P", "add-library-path!",
|
||||
"%1${.2,@(y19:base-path-separator)[01}?{.0,l1,@(y19:*library-path-list*"
|
||||
|
@ -756,8 +756,8 @@ char *t_code[] = {
|
|||
"irectory separator),@(y7:c-error)[12",
|
||||
|
||||
"P", "find-library-path",
|
||||
"%1@(y19:*library-path-list*),,#0.2,.1,&2{%1.0u?{f]1}${'(s4:.sld),.3a,:"
|
||||
"1,@(y14:listname->path)[03},.0?{.0F0}{f}?{.0]2}.1d,:0^[21}.!0.0^_1[11",
|
||||
"%1@(y19:*library-path-list*),,#0.0,.3,&2{%1.0p?{${'(s4:.sld),.3a,:0,@("
|
||||
"y14:listname->path)[03},.0?{.0F0}{f}?{.0]2}.1d,:1^[21}f]1}.!0.0^_1[11",
|
||||
|
||||
"P", "read-file-sexps",
|
||||
"%2.1,&1{%1:0?{t,.1P79}n,,#0.2,.1,&2{%1${:1,@(y14:read-code-sexp)[01},."
|
||||
|
|
Loading…
Reference in a new issue