Medley PSEUDOHOSTS 2 4 1 PSEUDOHOSTS 1 4 By Ron Kaplan This document was created in January 2022. A pseudohost identifies the root of a file system that exists as a subdirectory of another pre-existing file system. This gives a shorthand way of operating on a file in the subdirectory of a particular project without having to specify in the name of that file the entire path to its location in a larger file system. For example, suppose that the variable MEDLEYDIR contains the path from {DSK} to the subdirectory that contains all Medley system files (e.g. {DSK}kaplan>Local>medley>). If not connected to that subdirectory, then the file COREIO, say, would have to be reference as {DSK}kaplan>Local>medley>sources>COREIO. If MED is defined as a pseudohost with MEDLEYDIR as its prefix, then that file can also be identified more succinctly as {MED}COREIO. This package implements pseudohost file devices that allow files to be specified and manipulated in this way. The function PSEUDOHOST defines a new pseudohost whose files coincide with the files at the end of a prefix directory path: (PSEUDOHOST HOST PREFIX) [Function] For the Medley example, executing (PSEUDOHOST 'MED MEDLEYDIR) will set up MED as a (pseudo) host name that can be used to reference Medley system files. (The full filenames can also be used--the pseudohost just provides a systematic abbrevation.) If PSEUDOHOST is called with the host of a previous invocation but a different prefix, the new prefix replaces the old. If the prefix is NIL, the pseudohost is removed. If HOST is a list and PREFIX is NIL, HOST is interpreted as a (host prefix) pair. The target host defaults to DSK if PREFIX does not have an explicit host. When PSEUDOHOSTS is loaded, it executes (PSEUDOHOST 'LI LOGINHOSTDIR) so that files in the login directory can always be referenced succinctly with host LI, even while connected to another directory. (PSEUDOHOSTS) [Function] Returns the (host prefix) pairs of all currently defined pseudohosts. (PSEUDOHOSTP HOST) [Function] Returns the (host prefix) pair for a particular pseudohost, NIL if HOST is not a pseudohost. (TARGETHOST HOST) [Function] Returns the target host of a particular pseudohost, NIL if HOST is not a pseudohost. (TRUEFILENAME FILE) [Function] Returns the name of FILE in its true device, essentially replacing FILE's host by its prefix if it is a pseudohost. Returns FILE (possibly extended with the prefix of the connected directory) if its host is not a pseudohost. FILE may be a stream as well as a name. (PSEUDOFILENAME FILE) [Function] Returns the name of FILE in its pseudo device, if any, essentially replacing FILE's prefix by the hostname of a pseudodevice for that prefix. Returns FILE (possibly extended with the prefix of the connected directory) if it does not match a pseudohost prefix. FILE may be a stream as well as a name. (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) 4È$¨4È $È4È$È4È$¨4È$È4È$È1È$1ŠŠ8$1ŠŠ8$JÈ$È PAGEHEADING RUNNINGHEAD TIMESROMAN$TERMINALMODERN MODERN     HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN +g A 9&3! Iì "g)J  S-  F<4+”$!5=k$ m‹zº