* PSEUDOHOSTS: Overlay a file system at the end of a path in another file system New package, please look through it. * REGIONMANAGER: added RELCREATEPOSITION, allow for arguments to be spread If the WIDTH argument looks like a list of arguments, the arguments are spread out. Means that a relative region can be passed through intermediate functions. * EXAMINEDEFS: More control over regions and windows Examination windows are returned so that callers can manipulate them * TEDIT-PF-SEE: tf respects reader environment and bold faces of DEFUN and DEFMACRO names * COMPAREDIRECTORIES: refactored for more flexibility and easier maintenance Also, based on SPY, made more internal operations work on streams that are located and created once, rather than on file Added CDMERGE to merge CDVALUES for different subdirectories, to permit scrolling of all differences in a single browser window * COMPARESOURCES: Region for CS browser is passed through, window is returned Also tried to eliminate mismatching of simple edit timestamps * COMPARETEXT: Files can be input streams, region is passed in, window is returned * COMPAREDIRECTORIES again: Fixed a promptwindow bug * GITFNS: New package for comparing and copying back and forth from My Medley to the git clone * REGIONMANAGER: Added CLOSEWITH and MOVEWITh Primitives for building hierarchically dependent window clusters * PSEUDOHOSTS: Added PSEUDOHOSTNAME, hierarchical hosts #663 For hierarchical hosts (hosts whose prefixes are extensions of the prefixes of other pseudohosts), always the pseudofilename is always the shortest one. See #663 for more details * EXAMINEDEFS: Fix prettyprint of non-function expressions * GITFNS, Comparison files: Use CLOSEWITH and MOVEWITH abstractions for window hierarchies
40 lines
6.1 KiB
Plaintext
40 lines
6.1 KiB
Plaintext
Medley PSEUDOHOSTS2
|
||
|
||
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}<Users>kaplan>Local>medley>). If not connected to that subdirectory, then the file COREIO, say, would have to be reference as
|
||
{DSK}<Users>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}<sources>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.
|
||
|
||
|
||
|
||
|