[Ecls-list] default pathname question

Michael O'Connor moconnor59 at yahoo.com
Wed Jul 14 08:04:59 UTC 2004


Hi,

I'm trying to set up a default directory in my C
application that load will use when looking for files
at runtime. In Lisp I've found the following works:

(setf *default-pathname-defaults* (make-pathname
:directory "path/to/files"))
...
(load "test.lsp")
(load "../test.lsp")
etc.

In my app, I've got:

char *lisp_path = "/path/to/files";
cl_defparameter(cl_intern(1,
make_simple_string("*DEFAULT-PATHNAME-DEFAULTS*")),
    cl_list(1, cl_pathname_directory(
        make_string_copy(&lisp_path[1]))));

But when I run this I get error "((:RELATIVE "path"
"to" "files")) cannot be coerced to a pathname.

Can someone tell me what I'm doing wrong, or if
there's a better way of doing this?

Thanks,

Michael

BTW, I found I have to leave the leading slash off of
the directory above as make-pathname seems to add one
automatically (and with 2 leading slashes, load gives
error "Access to remote files not yet supported" -
which is not what I intended), I'd be curious to know
why make-pathname is doing this.


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail




More information about the ecl-devel mailing list