diff --git a/src/t.scm b/src/t.scm index d0d5029..4c07a4d 100644 --- a/src/t.scm +++ b/src/t.scm @@ -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 diff --git a/t.c b/t.c index fccde14..94f13e4 100644 --- a/t.c +++ b/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},."