Validated HTML 3.0 (draft)
This information is no longer current, but may be of interest.
0.1 | 0.4 | 0.4.1 | 0.5.0d1 | 0.5.1d1
One distribution of TinyMUSH/Mac has been made so far. It's based on TinyMUSH 2.0.8-p10, which I got several years ago from ftp://caisr2.caisr.cwru.edu/pub/mush/
, which no longer exists. After several months of hacking, I was able to compile it for 68K Macintosh with Metrowerks CodeWarrior 8. Several weeks later, I got it to link as well, and only a few days after that the damn thing actually works. :)
TinyMUSH is highly unix-dependent. This poses a problem for the Macintosh developer, manifesting in a number of symptoms:
#inclu
sion of nonexistent headers
use of unavailable functions
nonstandard coding (including omission of prototypes)
Some of these are correctable through the use of publicly available libraries. TinyMUSH/Mac uses GNU dbm 1.7.3 and its ndbm emulation, and Matthias Neeracher's GUSI (Grand Unified Socket Interface) 1.6.4 to implement Berkeley sockets on the Macintosh.
Unfortunately, it remains necessary to make numerous changes to the source code, which I'll try to enumerate:
Don't #include
<sys/file.h>
or <sys/param.h>
.
#define open(filename,accessmode,umode) open(filename, accessmode)
Redefine the signal handler to comply with <signal.h>
: void sighandler(int sig)
.
Eliminate references to undefined signals and NSIG
.
#define kill(pid, signum) raise(signum)
Eliminate calls to fork()
, vfork()
, and wait3()
.
Add/correct function prototypes.
Update variable argument usage for <stdarg.h>
(many more...)
This is intended as proof of concept -- I've released it so you can see what I've done. You cannot use it as it currently stands to run a real MUSH.
Here's why: in the process of debugging my inability to connect to the Wizard character, and thus @shutdown the MUSH (until which Quit doesn't work), I created a huge security hole -- Typing shutdown at the welcome screen will cause the event loop to stop iterating.
Of course, any bugs in TinyMUSH 2.0.8-p10 for unix are still there.
Due to problems I had with malloc()
, I've redirected it to NewPtr()
, and free()
to DisposePtr()
. I don't know what would happen if you called realloc()
. Calling free(NULL)
would be bad. I fixed one place in udb_attr.c
which does.
The crypt()
shim doesn't even pretend to encrypt anything (like passwords).
There's no port of dbconvert
, or its related scripts.
There are no .indx
files, and no port of mkindx
.
connect.txt
has DOS line breaks. All other text files have unix line breaks.
setsockopt()
is not implemented.
The times displayed in the WHO
list are completely wrong.
There's no provision for providing the command-line arguments (and therefore for creating the minimal DB), or returning a result code.
The server application is called Netmush
, but the Startmush script is expecting GUSI netmush
. Change one or the other.
The original TinyMUSH documentation is missing.
This release of TinyMUSH/Mac has no version number, but may be unambiguously refered to as "the first release".
TinyMUSH/Mac version 0.4 has been released, warts and all. (The previous version was 'the first release'.)
Timed events such as database dumps and idle checks now occur. With SIGALRM
now defined as 14 rather than 6, and the GUSI library rebuilt, alarm()
works, and has been reinstated.
The times displayed in WHO
lists have been corrected, by replacing a call to gmtime()
with one to localtime()
. The problem is that the parameter was a difference of two time_t
s, and gmtime()
was being used to convert to hours/minutes, etc. The time offset between local time and GMT is cancelled out in the subtraction, so calling gmtime()
relies on the environment using GMT. In unix systems, it does; on the Mac, it doesn't. Of course, my fix is just as bad, but I don't feel like redesigning MUSH just now.
Typing shutdown at the welcome screen no longer works. This was a deliberately-introduced security hole which I've deliberately removed.
Startmush
correctly calls 'Netmush', not 'GUSI Netmush'.
All *.txt
files now use DOS line breaks. This fixes raw file-dumping problems with telnet clients regardless of the server platform.
The Quit Apple event is implemented! The event is processed through GUSI's event loop. The handler sets mudstate.shutdown_flag
and calls alarm(1)
to interrupt what is probably a select()
call (with a timeout of 1000 seconds). Note that SIOUX's response to choosing Quit from the File menu does not send an Apple event, and will have no effect.
SIOUX no longer bugs you about saving the output. After a Quit Apple event or @shutdown
command is received, TinyMUSH/Mac will quit normally, without asking about saving the output. If you wish to save the output, do so in advance.
The GUSI library has been upgraded to version 1.7.0.
Holding down the Control key at launch will create a minimal database containing the room Limbo and the player Wizard.
The original MUSH documentation is included.
TinyMUSH/Mac 0.4.1 is a maintenance release.
The Control key hack to create a minimal database works again.
Startmush will no longer cause an error if there's no database present. Instead, it displays a two-button alert. You can either hold down Control and continue (to make the minimal database), or cancel (to exit).
Startmush will not cause an error if you have both a checkpoint database (.db.new
) and a good panic dump (.db.CRASH
). Instead, it displays an alert telling you to remove one of them, and exits. I don't think this one hit too many people.
The Read Me has been updated to cover these changes.
Two new documents, Changes and Agenda, are included.
TinyMUSH/Mac 0.5.0d1 fixes several bugs and includes indices for help and news.
The version number now indicates that this release is a developmental version, which all releases have been, despite the lack of the conventional decoration in the version number. I also have an extra digit to work with now. :)
TinyMUSH/Mac is now compiled with 68020 instructions, which may improve speed in some areas. If you want to run it on a Mac Plus, SE, Classic, Portable, or PowerBook 100, then you're nuts, and I must recommend that you reconsider. But I'll make you a separate version anyway.
Problems with incorrect translation between numeric and string IP addresses, possibly along with other, unidentified problems, were caused by incorrect linking of the program code. In particular were problems with site configuration. These have been fixed.
I've changed alarm(1)
to alarm(3)
, which seems to reduce both the sporadic disconnections and the repeating new_connection
messages. A side effect is that timed commands are only checked every three seconds. The use of alarm()
in the first place is clearly a design flaw, and even constitutes abuse of the function. Replacing it with a more appropriate mechanism is one of many improvements on my agenda.
The dangers of executing some really filthy code to store the help indices in memory were previously avoided only by the lack of .indx
files. The code remains filthy, but less of it is used. The system, or at least my debugger, is no longer brought to its knees trying to allocate lots of little bits of memory.
The new files help.indx
, wizhelp.indx
, and news.indx
are now included, though MkIndx is not (yet). Warning! Do not use these with prior releases of TinyMUSH/Mac! Version 0.4.1 or earlier has not been revised to curb memory abuse when storing the indices, and is very likely to crash the system.
TinyMUSH/Mac 0.5.1d1 fixes the sporadic disconnections (I think) as well as the repeating new_connection() error message, and includes MakeIndex -- a scriptable, drag-and-drop indexer based on mkindx.
For details, please read the documentation included in the archive.
Netmush is now compiled with CodeWarrior 9, using GUSI 1.7.2.
The sporadic disconnections should be gone.
Failed connections (such as the second of two concurrent connection attempts) no longer cause a repeating error message.
MakeIndex.