[armedbear-devel] :case :common

Pascal J. Bourguignon pjb at informatimago.com
Sun Nov 7 04:02:12 UTC 2010

CLHS says: Common Case in Pathname Components

    For the functions in Figure 19-2, a value of :common for the :case
    argument that these functions should receive and yield strings in
    component values according to the following conventions:

    * All uppercase means to use a file system's customary case.
    * All lowercase means to use the opposite of the customary case.
    * Mixed case represents itself.

    Note that these conventions have been chosen in such a way that
    translation from :local to :common and back to :local is

[pjb at kuiper :0.0 lisp]$ abcl
Armed Bear Common Lisp 0.20.0
Java 1.6.0_22 Sun Microsystems Inc.
Java HotSpot(TM) Server VM
Low-level initialization completed in 0.265 seconds.
Startup completed in 0.718 seconds.
Type ":help" for a list of available commands.
CL-USER(1): (make-pathname :name "TEST" :type "LISP" :case :common)
CL-USER(2): (namestring (make-pathname :name "TEST" :type "LISP" :case :common))

I'm on a linux system on a ext3 file system.  The customary case is
lower case (case significant on this particular file system, but
99.999% of the files on unix are lower case).

Therefore I would expect to get #P"test.lisp"

Notice that:

    (make-pathname :name "test" :type "lisp" :case :common)
    should produce #P"TEST.LISP"

and that:

    (make-pathname :name "Test" :type "Lisp" :case :common)
    should produce #P"Test.Lisp"

And that I understand "yeld strings in component values" to mean that
the processing should be done on each parameter independently.

__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.

More information about the armedbear-devel mailing list