-
-
Notifications
You must be signed in to change notification settings - Fork 29
Description
I am trying to understand what’s going on in UNPACKFILENAME.STRING (actually rewriting to bring it under control) to fix some of the odd behavior we have noticed (name-fields beginning with dots, extensions with all digits…).
It has a call (SETQ OSTYPE (GETHOSTINFO HOST 'OSTYPE)) and it appears to use that decide what version indicator to allow ; usually but also ! for IFS, . for TOPS20.
If HOST is DSK, it returns IFS. That seems like a bug. For UNIX it returns NIL.
But then the use of period in the TOPS20 case may not be confined to just the TOPS20 host (the code is really complicated), but that might be source of the counter-intuitive behavior that Nick encountered:
123 is a version for {DSK}a.b.123
- is a version for {DSK}a.b.*
x is an extension for {DSK}a.b.x
but
123 * x is an extension if there is only one dot (e.g. {DSK}a.123)
So the last dot is not consistently an extension, it depends on the actual characters that follow, whether or not the host is tops20.
The is could be fixed for all practical purposes by making the last period of a sequence of periods a version indicator more specifically only for TOPS20 (which we presumably will never see). For TOPS20 there would still be inconsistent behavior.
Or, the period case can be deprecated entirely. And maybe the exclamation case also. When inside Medley, filenames should be specified in "Medley standard format" strings. The existing device-specific functions for recognition and generation should always coerce to and from Medley-standard syntax.
The commonlisp path abstraction is an attempt at a syntax-independent solution, but insisting on that everywhere would tilt the whole system. But the unambiguous parsed format (equivalent to a path) can be created from a Medley-standard string (by UNPACKFILENAME.STRING) going into a device, and PACKFILENAME can create a Medley-standard string on the way back. The device would traffic only in preparsed fields, and above the device level there would only be Medley-standard strings unambiguously related to commonlisp paths.
The current set up is complicated and inconsistent.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status