|
From: SourceForge.net <no...@so...> - 2010-11-17 01:39:56
|
Bugs item #3110367, was opened at 2010-11-17 00:33 Message generated for change (Comment added) made by haible You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3110367&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clisp Group: ANSI compliance issue >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Pascal J. Bourguignon (informatimago) Assigned to: Bruno Haible (haible) Summary: :case :common for logical pathnames. Initial Comment: When creating a logical pathname with make-pathname, :case :common, the pathname components are downcased. I would argue that the customary case for logical pathnames is upper case, since: 19.3.1.1.7 Lowercase Letters in a Logical Pathname Namestring When parsing words and wildcard-words, lowercase letters are translated to uppercase. I'd expect (string= (pathname-name (make-pathname :host "TEST" :name "FILE" :type "DATA" :case :common)) (pathname-name #P"TEST:FILE.DATA")) and of course (string= "FILE" (pathname-name #P"TEST:FILE.DATA")) and similarly for the other pathname components. [pjb@kuiper :0.0 ~]$ clisp -norc -ansi i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. [1]> (setf (logical-pathname-translations "TEST") nil) NIL [2]> (setf (logical-pathname-translations "TEST") (quote ((#P"TEST:**;*.*" "/tmp/**/*.*") (#P"TEST:**;*" "/tmp/**/*")))) ((#P"TEST:**;*.*" "/tmp/**/*.*") (#P"TEST:**;*" "/tmp/**/*")) [3]> (pathname-name (make-pathname :host "TEST" :name "FILE" :type "DATA" :case :common)) "file" [4]> (pathname-name #P"TEST:FILE.DATA") "FILE" [5]> ---------------------------------------------------------------------- >Comment By: Bruno Haible (haible) Date: 2010-11-17 02:39 Message: The behaviour of :case :common is specified in CLHS section 19.2.2.1.2.2 http://www.lispworks.com/documentation/HyperSpec/Body/19_bbabb.htm For clisp, the "filesystem's customary case" is lowercase, both on Unix and on Windows. The section you cite, 19.3.1.1.7, doesn't apply for two reasons: 1) It applies only to logical pathnames. But (make-pathname :host "TEST" :name "FILE" :type "DATA" :case :common) yields an ordinary pathname in clisp. If you want a logical pathname, use the LOGICAL-PATHNAME function. 2) It applies to the parsing of namestrings for logical pathnames that contain lowercase letters. In your example (make-pathname :host "TEST" :name "FILE" :type "DATA" :case :common) all of these are upper case, therefore the contents of 19.3.1.1.7 doesn't apply. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3110367&group_id=1355 |