1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-25 19:56:53 +00:00

Added XHOST.

Resolves #320

Source from MC: ALAN; XHOST 36.
This commit is contained in:
Eric Swenson
2016-12-20 15:32:20 -08:00
committed by Lars Brinkhoff
parent cc5789597e
commit cbbdbe357f
4 changed files with 657 additions and 0 deletions

87
doc/info/xhost.5 Executable file
View File

@@ -0,0 +1,87 @@
-*- Text -*-

File: XHOST Node: Top Up: (DIR)
After 31 March 1987 the NIC will no longer allow alternate host names
(nicknames) to appear in the Official Host Table or domain name servers.
Unfortunately there are many mailing list files around that contain entries
using these soon-to-be-obsolete hostnames. XHOST is a tool for assisting
in the conversion of such mailing list files to use only "approved" host
names.
XHOST has two parts. There is an :XHOST program that reads a mailing list
file and writes an "XHOST" file in which all nicknames have been flagged,
and an XHOST Emacs library that contains an Emacs command for performing a
query-replace-style scan of an XHOST file.
:XHOST takes the name of a mailing list file as an argument, and writes a
file whose second name is XHOST. For example:
:XHOST GUBBLE PEOPLE
will read the file GUBBLE PEOPLE from your working directory and write a
file there named GUBBLE XHOST.
The format of an XHOST file is fairly simple. Each nickname that :XHOST
thinks it has found will be immediately followed by rubout ("¢, ASCII
code 177). Following the rubout is the hostname that XHOST recommends as a
replacement.
The replacement will start with an atsign ("@") if the original hostname
did not. This will turn an entry like "(RPG SU-AI)" into the preferred form
"(RPG @SAIL.STANFORD.EDU)", which will result in better host name error
reporting from the mailer.
:XHOST does -not- really understand the format of mailing list files. It
understands how to parse comments, but it does not understand the parenthesis
structure. Thus occasionally it will offer to turn a user name into a
hostname. For example it might offer:
HENRYÀHENRY.ECE.CMU.EDU
Watching out for things like this will keep you on your toes. (XHOST has a
table of known absurd replacements such as "DanG" => "NYU-DANGER.ARPA".
The maintainer will accept nominations for additions.)
Loading the XHOST Emacs library defines a single Emacs command:
M-X Canonicalize Hosts. This command scans through an XHOST file searching
for the hostnames flagged by :XHOST. For each one that it finds, you can
accept or decline the proposed replacement. M-X Canonicalize Hosts behaves
very much like M-X Query Replace. The complete list of commands it accepts
are:
Space - Replace old host name with new.
Rubout - Leave old host name as it is.
N - Nothing. Leave both host names in buffer.
U - Undo last change.
C-L - Redisplay.
C-R - Enter recursive ^R mode.
Q - Quits.
? - Self documentation.
As an additional feature, if M-X Canonicalize Hosts does not find any
flagged names in the currently selected buffer, it assumes that you
probably need to run :XHOST first. It offers to write out the current
buffer if necessary, and then sends a command to DDT to run :XHOST over
that file and then return to Emacs. When :XHOST is complete, the XHOST
file is read back into the current buffer and M-X Canonicalize Hosts starts
its normal scan.
Thus the easiest way to update the mailing list file GUBBLE PEOPLE is to
1. read GUBBLE PEOPLE into an Emacs buffer
2. do M-X Load Library$XHOST if you haven't already in this Emacs
3. do M-X Canonicalize Hosts
4. answer "Y" when it offers to run :XHOST,
5. get a cup of tea while :XHOST runs, it's not instantaneous
6. decide what to do about each host one-by-one as M-X Canonicalize
Hosts shows them to you
7. write the resulting file back out over the old GUBBLE PEOPLE.
There will still be a GUBBLE XHOST file sitting around when you are
finished. If you are 100% certain that what you just did was correct, then
you can just delete it. If you decide that you screwed up, you can always
recover by reading in GUBBLE XHOST, and running M-X Canonicalize Hosts
again.
Bugs, suggestions, etc. to Alan@AI.