There were two problems here:
- The FOPEN code in 56 uses new C.DISK/C.TTY flags to keep track of the
channel type, so it knew what to do when closing the channel. The
TOPS-20 open code had been modified to set these, but the ITS code
hadn't, so CLOSE was assuming all channels were network channels.
Fix: set those flags in ODSK and OTTY, as TOPS-20 does.
- The BFCDSK flush routine had been modified to use byte pointer writes
to write the last incomplete word for both TOPS-20 (SOUT) and ITS
(SIOT). But on ITS, SIOT only works in unit mode, and Muddle opens
files in block mode.
Fix: restore the working code from Muddle 54 for writing the last
word. The only difference is that BFCDSK can now be invoked with the
leftover byte count (C) being zero, so it needs to check at the
start to avoid duplicating the last word in that case.
Found from comparison with a TS MUD54 binary. The Muddle 56/106 source
came from TOPS-20 originally, and it had been extracted with newline
conversion but not ITS encoding.
Most of these are cosmetic, but there are a couple of VALRET strings
with embedded \rs -- including the one used to exit initialisation.
So successful initialisation now finishes with a *, rather than opening
a random location.
Most of these are the same as before. For UUOH, I've taken the fixed ITS
conditionals from uuoh.mid.181 (16th March 1981). For MAPPUR, I've put
the Tenex conditional around the whole of the segment-switching code
since none of it is needed on ITS.
Note in particular that the BOT patch is no longer needed -- this
version of Muddle works happily with the pure region at 700000.