Validated HTML 3.0 (draft)
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".