[Ecls-list] Re: translate-logical-pathname gives an ABSOLUTE for a RELATIVE !

Pascal Bourguignon pjb at informatimago.com
Tue May 23 08:05:06 UTC 2006


Raymond Toy writes:
> [Pascal complained about the result of TRANSLATE-PATHNAME]
> Ah, I see.  Hmm.  I guess the question is what is
> 
> (translate-pathname 
>    "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;UTILITY.LISP"
>    #P"PACKAGES:COM;INFORMATIMAGO;**;*.*.*"
>    #P"**/*.*.~*~")
> 
> supposed to return.  I'll have to read up on that.  The comments in
> the code say that :relative or :absolute is taken from the source
> directory.  Don't know if that's right or not.

Well, reading TRANSLATE-PATHNAME,  I see that my expectations were too
high, this is mostly implementation dependant.

(all tests on Linux x86):

clisp 2.38:

    (translate-pathname 
            "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;UTILITY.LISP.42"
            #P"PACKAGES:COM;INFORMATIMAGO;**;*.*.*"
            #P"**/*.*") ; clisp doesn't take versions, grrr!
    --> #P"common-lisp/utility.lisp"

sbcl 0.9.12:

    (translate-pathname 
            "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;UTILITY.LISP.42"
            #P"PACKAGES:COM;INFORMATIMAGO;**;*.*.*"
            #P"**/*.*") ; sbcl doesn't take versions either, grrr!
    --> #P"/common-lisp/utility.lisp"
 
ecl-9g:

     (translate-pathname 
            "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;UTILITY.LISP.42"
            #P"PACKAGES:COM;INFORMATIMAGO;**;*.*.*"
            #P"**/*.*") ; ecl doesn't take versions, grrr!
     --> #P"COMMON-LISP/UTILITY.LISP"

gcl 2.6.7:

     Doesn't define translate-pathname :-(

Allegro 7.0:

    (translate-pathname 
            "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;UTILITY.LISP.42"
            #P"PACKAGES:COM;INFORMATIMAGO;**;*.*.*"
            #P"**/*.*") ; allegro doesn't like versions either, grrr!
    --> #P"COMMON-LISP/UTILITY.LISP"



I feel the most useful result on a unix-like file system, is that of clisp.

But I should probably avoid relative pathnames in my translations to
make a more portable program.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Litter box not here.
You must have moved it again.
I'll poop in the sink. 




More information about the ecl-devel mailing list