Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!master!saab!billr From: billr@saab.tek.com (Bill Randle) Newsgroups: comp.sources.games Subject: v12i046: tinymud2 - user-extendible multi-user adventure (v1.5.4), sysv_diffs Message-ID: <914@masterCNA.TEK.COM> Date: 8 Mar 91 23:21:57 GMT Sender: news@masterCNA.TEK.COM Lines: 287 Approved: billr@saab.CNA.TEK.COM Submitted-by: John Temples Posting-number: Volume 12, Issue 46 Archive-name: tinymud2/sysv_diffs Patch-to: tinymud2: Volume 12, Issue 46-46 Environment: [This is a set of patches to get tinymud2 running under System V. (Untested by me.) -br] #!/bin/sh # This is a shell archive (shar 3.32) # made 03/07/1991 05:00 UTC by john@jwt # # existing files WILL be overwritten # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 972 -rw-r--r-- README.sysv # 5017 -rw-r--r-- sysv.diffs # 310 -rw-r--r-- fakeselect.h # if touch 2>&1 | fgrep 'amc' > /dev/null then TOUCH=touch else TOUCH=true fi # ============= README.sysv ============== echo "x - extracting README.sysv (Text)" sed 's/^X//' << 'SHAR_EOF' > README.sysv && XThese diffs allow TinyMUD to be built on a System V machine without Xnetworking by using named pipes for IPC. They have been tested only Xunder System V/386 Release 3.2 (ESIX and ISC). They were developed Xfor TinyMUD v1.5.4 as distributed in comp.sources.games, volume 11. XAlso required is the file xenix_diffs from the same c.s.g volume. X XHow to install: X X1. Unpack all archives. X2. Apply the Xenix diffs with "patch < xenix.diffs" X3. Apply the System V diffs with "patch < sysv.diffs" X4. Run "joinspl.sh". X5. Run a make. X6. The server is started by typing "fifonetmud dbfile dumpfile". X "small.db" is included in the distribution and can be used for "dbfile". X7. The supplied client is "tinymud.sh" X XNotes: X XTinyMUD requires an ANSI C compiler. gcc works fine. X XMy implementation of the FD_* macros in "fakeselect.h" will only Xallow about 14 players in the game. A better implementation would be Xrequired to allow more players. X-- XJohn W. Temples, III Xjohn@jwt.UUCP SHAR_EOF $TOUCH -am 0304154191 README.sysv && chmod 0644 README.sysv || echo "restore of README.sysv failed" set `wc -c README.sysv`;Wc_c=$1 if test "$Wc_c" != "972"; then echo original size 972, current size $Wc_c fi # ============= sysv.diffs ============== echo "x - extracting sysv.diffs (Text)" sed 's/^X//' << 'SHAR_EOF' > sysv.diffs && X*** joinspl.sh Mon Mar 4 14:42:29 1991 X--- joinspl.sh Mon Jan 28 09:56:47 1991 X*************** X*** 10,15 **** X # X # build tinymud.ps from its three parts X # X! creating tinymud.ps X cat tinymud.ps.xa? >tinymud.ps X rm tinymud.ps.xa? X--- 10,15 ---- X # X # build tinymud.ps from its three parts X # X! echo creating tinymud.ps X cat tinymud.ps.xa? >tinymud.ps X rm tinymud.ps.xa? X*** fifoiface.c Mon Mar 4 14:50:01 1991 X--- fifoiface.c Mon Mar 4 14:50:45 1991 X*************** X*** 16,22 **** X #include X #include X #include X! #include X #include X #include X #include X--- 16,22 ---- X #include X #include X #include X! #include "fakeselect.h" X #include X #include X #include X*************** X*** 178,187 **** X fd_set r, w, x; X X if (timeout) sec=timeout->tv_sec+(timeout->tv_usec+500)/1000; X! r= *rfds; w= *wfds; x= *xfds; X X while(1) { X! *rfds=r; *wfds=w; *xfds=x; X for(maxfd=fd=0;fdtv_sec+(timeout->tv_usec+500)/1000; X! r= *rfds; w= *wfds; X X while(1) { X! *rfds=r; *wfds=w; X for(maxfd=fd=0;fd fakeselect.h && Xtypedef long fd_set; X Xstruct timeval { X long tv_sec; X long tv_usec; X}; X X#define FD_SETSIZE (sizeof(fd_set) * 8) X#define FD_SET(fd, maskptr) (*maskptr |= (1 << fd)) X#define FD_CLR(fd, maskptr) (*maskptr &= ~(1 << fd)) X#define FD_ZERO(maskptr) (*maskptr = 0) X#define FD_ISSET(fd, maskptr) (*maskptr & (1 << fd)) SHAR_EOF $TOUCH -am 0304150691 fakeselect.h && chmod 0644 fakeselect.h || echo "restore of fakeselect.h failed" set `wc -c fakeselect.h`;Wc_c=$1 if test "$Wc_c" != "310"; then echo original size 310, current size $Wc_c fi exit 0