009-011.diff.bz2
patches · 8.8 KB · 2010-03-30
Download « Back to the patches list
diff -buraP 009/HACKLOG 011/HACKLOG
--- 009/HACKLOG 2008-10-08 12:45:25.000000000 -0400
+++ 011/HACKLOG 2008-10-09 05:48:15.000000000 -0400
@@ -386,3 +386,33 @@
in a central location. Otherwise, I'll create patches from
svn's diff system.
+ 1356 I've added ID tags to the top of every source file. These will get
+ filled in by svn with the last time that file was changed and
+ commited, as well as revision numbers, etc.
+
+ 2115 Removed all the OS specific things. I started out stripping the
+ MSDOS and macintosh code. Once that was done, the majority of
+ all the other OS defines were workarounds for supposedly missing
+ system header definitions. I've never seen a C compiler for ANY
+ platform (even the Commodore 64!) where a function existed in the
+ system library, but didn't have a header defintion somewhere.
+
+ For historical archiving, I removed:
+
+ MSDOS, macintosh, _AIX, apollo, hpux, MIPS_OS, NeXT, sequent,
+ sun, ultrix, and interactive
+
+ Things that used to be linux or unix are now simply there. I will
+ make a small effort to see if anything special needs to be done
+ for FreeBSD (which should also cover OS X), but anything else
+ has an audience which should know what they need to do to handle
+ portability issues.
+
+081009 Quixadhal
+ 0545 ACK! I didn't realize that you had to ENABLE token substitution
+ on every file you want svn to perform substitution on. Ok...
+ New patch just to enable the "Id" keyword on every source file.
+
+ On the upside, it is kindof nice that it doesn't have to check
+ all the data files for substitution values on every checkout.
+
diff -buraP 009/src/Makefile 011/src/Makefile
--- 009/src/Makefile 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/Makefile 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+#
+# RAM $Id: Makefile 11 2008-10-09 09:48:15Z quixadhal $
+#
+
CC = g++
# Comment out the -Wmissing-format-attribute flag if you're using gcc 2.95
@@ -19,31 +23,39 @@
WARN = $(W_ANSI) $(W_UBER) $(W_FORMAT) $(W_MESSY) $(W_FUNC) $(W_TYPE) $(W_EXTRA) $(W_NITPICK) $(W_CONLY) $(W_ERROR)
OPT = -O
DEBUG = -g
+CRYPT = #-DNOCRYPT # Uncomment to use clear-text passwords
+RAND = #-DOLD_RAND # Uncomment if your random number generator is broken
+MALLOC = #-DMALLOC_DEBUG # Uncomment for extra malloc debugging code
+SOCIAL = #-DSOCIAL_DEBUG # Uncomment for debugging of the socials
-C_FLAGS = $(WARN) $(OPT) $(DEBUG)
+OPTIONS = $(OPT) $(DEBUG) $(CRYPT) $(RAND) $(MALLOC) $(SOCIAL)
+
+C_FLAGS = $(WARN) $(OPTIONS)
L_FLAGS = $(DEBUG)
SOLARIS_LIBS = -lsocket -lresolv -lnsl
LINUX_LIBS = -lcrypt
LIBS = $(LINUX_LIBS)
-O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
- alias.o ban.o comm.o const.o db.o db2.o effects.o fight.o flags.o \
- handler.o healer.o interp.o note.o lookup.o magic.o magic2.o \
- music.o recycle.o save.o scan.o skills.o special.o tables.o \
- update.o
+O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o \
+ act_wiz.o alias.o ban.o comm.o const.o \
+ db.o db2.o effects.o fight.o flags.o \
+ handler.o healer.o interp.o lookup.o magic.o \
+ magic2.o music.o note.o recycle.o save.o \
+ scan.o skills.o special.o tables.o update.o
rom: $(O_FILES)
- @rm -f rom
- $(CC) $(L_FLAGS) -o rom $(O_FILES) $(LIBS)
- @ls -l rom
+ @rm -f $@
+ $(CC) $(L_FLAGS) -o $@ $(O_FILES) $(LIBS)
+ @ls -l $@
%o : %c
$(CC) $(C_FLAGS) -c $< -o $@
tags :
+ @rm -f $@
@ctags *.[ch]
- @ls -l tags
+ @ls -l $@
clean:
@rm -f *.o
@@ -52,39 +64,38 @@
@rm -f *.o tags rom
dep:
- @find . -name \*.c -a -type f -print0 | xargs -0 -P 1 -r g++ -O -g -MM
+ @find . -name \*.c -a -type f -print0 | xargs -0 -P 1 -r $(CC) $(OPTIONS) -MM
#--- Dependancies go below here ---
+act_enter.o: act_enter.c merc.h interp.h
+effects.o: effects.c merc.h recycle.h
act_obj.o: act_obj.c merc.h interp.h
-lookup.o: lookup.c merc.h tables.h
-tables.o: tables.c merc.h tables.h
scan.o: scan.c merc.h interp.h
+note.o: note.c merc.h interp.h recycle.h tables.h
+update.o: update.c merc.h interp.h music.h
+alias.o: alias.c merc.h interp.h
+music.o: music.c merc.h interp.h music.h recycle.h
+db2.o: db2.c merc.h db.h lookup.h
db.o: db.c merc.h interp.h db.h recycle.h music.h lookup.h
-skills.o: skills.c merc.h interp.h magic.h recycle.h
-effects.o: effects.c merc.h recycle.h
+recycle.o: recycle.c merc.h recycle.h
+magic.o: magic.c merc.h interp.h magic.h recycle.h
+act_comm.o: act_comm.c merc.h interp.h recycle.h tables.h
+tables.o: tables.c merc.h tables.h
+lookup.o: lookup.c merc.h tables.h
+magic2.o: magic2.c merc.h interp.h magic.h
act_move.o: act_move.c merc.h interp.h
-act_enter.o: act_enter.c merc.h interp.h
-const.o: const.c merc.h magic.h interp.h
+save.o: save.c merc.h recycle.h lookup.h tables.h
interp.o: interp.c merc.h interp.h
-magic.o: magic.c merc.h interp.h magic.h recycle.h
+special.o: special.c merc.h interp.h magic.h
+skills.o: skills.c merc.h interp.h magic.h recycle.h
+fight.o: fight.c merc.h interp.h
+comm.o: comm.c merc.h interp.h recycle.h tables.h telnet.h
+healer.o: healer.c merc.h interp.h magic.h
+const.o: const.c merc.h magic.h interp.h
flags.o: flags.c merc.h interp.h tables.h
-update.o: update.c merc.h interp.h music.h
act_wiz.o: act_wiz.c merc.h interp.h recycle.h tables.h lookup.h
-magic2.o: magic2.c merc.h interp.h magic.h
-handler.o: handler.c merc.h interp.h magic.h recycle.h tables.h
-note.o: note.c merc.h interp.h recycle.h tables.h
-healer.o: healer.c merc.h interp.h magic.h
-music.o: music.c merc.h interp.h music.h recycle.h
-db2.o: db2.c merc.h db.h lookup.h
act_info.o: act_info.c merc.h interp.h magic.h recycle.h tables.h \
lookup.h
-act_comm.o: act_comm.c merc.h interp.h recycle.h tables.h
-recycle.o: recycle.c merc.h recycle.h
-save.o: save.c merc.h recycle.h lookup.h tables.h
ban.o: ban.c merc.h recycle.h interp.h
-alias.o: alias.c merc.h interp.h
-comm.o: comm.c merc.h interp.h recycle.h tables.h telnet.h
-fight.o: fight.c merc.h interp.h
-special.o: special.c merc.h interp.h magic.h
-
+handler.o: handler.c merc.h interp.h magic.h recycle.h tables.h
diff -buraP 009/src/act_comm.c 011/src/act_comm.c
--- 009/src/act_comm.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/act_comm.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: act_comm.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,12 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/act_enter.c 011/src/act_enter.c
--- 009/src/act_enter.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/act_enter.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: act_enter.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/act_info.c 011/src/act_info.c
--- 009/src/act_info.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/act_info.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: act_info.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,12 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/act_move.c 011/src/act_move.c
--- 009/src/act_move.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/act_move.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: act_move.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include "merc.h"
diff -buraP 009/src/act_obj.c 011/src/act_obj.c
--- 009/src/act_obj.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/act_obj.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: act_obj.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/act_wiz.c 011/src/act_wiz.c
--- 009/src/act_wiz.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/act_wiz.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: act_wiz.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/alias.c 011/src/alias.c
--- 009/src/alias.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/alias.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: alias.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <time.h>
diff -buraP 009/src/ban.c 011/src/ban.c
--- 009/src/ban.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/ban.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: ban.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/comm.c 011/src/comm.c
--- 009/src/comm.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/comm.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: comm.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -43,12 +47,8 @@
* -- Furey 26 Jan 1993
*/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <ctype.h>
#include <errno.h>
@@ -58,241 +58,33 @@
#include <time.h>
#include <unistd.h>
#include <crypt.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
#include "merc.h"
#include "interp.h"
#include "recycle.h"
#include "tables.h"
+#include "telnet.h"
/*
* Malloc debugging stuff.
*/
-#if defined(sun)
-#undef MALLOC_DEBUG
-#endif
-
#if defined(MALLOC_DEBUG)
#include <malloc.h>
extern int malloc_debug args( ( int ) );
extern int malloc_verify args( ( void ) );
#endif
-
-
-/*
- * Signal handling.
- * Apollo has a problem with __attribute(atomic) in signal.h,
- * I dance around it.
- */
-#if defined(apollo)
-#define __attribute(x)
-#endif
-
-#if defined(unix)
-#include <signal.h>
-#endif
-
-#if defined(apollo)
-#undef __attribute
-#endif
-
-
-
/*
* Socket and TCP/IP stuff.
*/
-#if defined(macintosh) || defined(MSDOS)
-const char echo_off_str [] = { '\0' };
-const char echo_on_str [] = { '\0' };
-const char go_ahead_str [] = { '\0' };
-#endif
-
-#if defined(unix)
-#include <fcntl.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include "telnet.h"
const char echo_off_str [] = { IAC, WILL, TELOPT_ECHO, '\0' };
const char echo_on_str [] = { IAC, WONT, TELOPT_ECHO, '\0' };
const char go_ahead_str [] = { IAC, GA, '\0' };
-#endif
-
-
-
-/*
- * OS-dependent declarations.
- */
-#if defined(_AIX)
-#include <sys/select.h>
-int accept args( ( int s, struct sockaddr *addr, int *addrlen ) );
-int bind args( ( int s, struct sockaddr *name, int namelen ) );
-void bzero args( ( char *b, int length ) );
-int getpeername args( ( int s, struct sockaddr *name, int *namelen ) );
-int getsockname args( ( int s, struct sockaddr *name, int *namelen ) );
-int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
-int listen args( ( int s, int backlog ) );
-int setsockopt args( ( int s, int level, int optname, void *optval,
- int optlen ) );
-int socket args( ( int domain, int type, int protocol ) );
-#endif
-
-#if defined(apollo)
-#include <unistd.h>
-void bzero args( ( char *b, int length ) );
-#endif
-
-#if defined(__hpux)
-int accept args( ( int s, void *addr, int *addrlen ) );
-int bind args( ( int s, const void *addr, int addrlen ) );
-void bzero args( ( char *b, int length ) );
-int getpeername args( ( int s, void *addr, int *addrlen ) );
-int getsockname args( ( int s, void *name, int *addrlen ) );
-int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
-int listen args( ( int s, int backlog ) );
-int setsockopt args( ( int s, int level, int optname,
- const void *optval, int optlen ) );
-int socket args( ( int domain, int type, int protocol ) );
-#endif
-
-#if defined(interactive)
-#include <net/errno.h>
-#include <sys/fnctl.h>
-#endif
-
-#if defined(linux)
-/*
- Linux shouldn't need these. If you have a problem compiling, try
- uncommenting these functions.
-*/
-/*
-int accept args( ( int s, struct sockaddr *addr, int *addrlen ) );
-int bind args( ( int s, struct sockaddr *name, int namelen ) );
-int getpeername args( ( int s, struct sockaddr *name, int *namelen ) );
-int getsockname args( ( int s, struct sockaddr *name, int *namelen ) );
-int listen args( ( int s, int backlog ) );
-
-int close args( ( int fd ) );
-int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
-int read args( ( int fd, char *buf, int nbyte ) );
-int select args( ( int width, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout ) );
-int socket args( ( int domain, int type, int protocol ) );
-int write args( ( int fd, char *buf, int nbyte ) );
-*/
-#endif
-
-#if defined(macintosh)
-#include <console.h>
-#include <fcntl.h>
-#include <unix.h>
-struct timeval
-{
- time_t tv_sec;
- time_t tv_usec;
-};
-#if !defined(isascii)
-#define isascii(c) ( (c) < 0200 )
-#endif
-static long theKeys [4];
-
-int gettimeofday args( ( struct timeval *tp, void *tzp ) );
-#endif
-
-#if defined(MIPS_OS)
-extern int errno;
-#endif
-
-#if defined(MSDOS)
-int gettimeofday args( ( struct timeval *tp, void *tzp ) );
-int kbhit args( ( void ) );
-#endif
-
-#if defined(NeXT)
-int close args( ( int fd ) );
-int fcntl args( ( int fd, int cmd, int arg ) );
-#if !defined(htons)
-u_short htons args( ( u_short hostshort ) );
-#endif
-#if !defined(ntohl)
-u_long ntohl args( ( u_long hostlong ) );
-#endif
-int read args( ( int fd, char *buf, int nbyte ) );
-int select args( ( int width, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout ) );
-int write args( ( int fd, char *buf, int nbyte ) );
-#endif
-
-#if defined(sequent)
-int accept args( ( int s, struct sockaddr *addr, int *addrlen ) );
-int bind args( ( int s, struct sockaddr *name, int namelen ) );
-int close args( ( int fd ) );
-int fcntl args( ( int fd, int cmd, int arg ) );
-int getpeername args( ( int s, struct sockaddr *name, int *namelen ) );
-int getsockname args( ( int s, struct sockaddr *name, int *namelen ) );
-int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
-#if !defined(htons)
-u_short htons args( ( u_short hostshort ) );
-#endif
-int listen args( ( int s, int backlog ) );
-#if !defined(ntohl)
-u_long ntohl args( ( u_long hostlong ) );
-#endif
-int read args( ( int fd, char *buf, int nbyte ) );
-int select args( ( int width, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout ) );
-int setsockopt args( ( int s, int level, int optname, caddr_t optval,
- int optlen ) );
-int socket args( ( int domain, int type, int protocol ) );
-int write args( ( int fd, char *buf, int nbyte ) );
-#endif
-
-/* This includes Solaris Sys V as well */
-#if defined(sun)
-int accept args( ( int s, struct sockaddr *addr, int *addrlen ) );
-int bind args( ( int s, struct sockaddr *name, int namelen ) );
-void bzero args( ( char *b, int length ) );
-int close args( ( int fd ) );
-int getpeername args( ( int s, struct sockaddr *name, int *namelen ) );
-int getsockname args( ( int s, struct sockaddr *name, int *namelen ) );
-int listen args( ( int s, int backlog ) );
-int read args( ( int fd, char *buf, int nbyte ) );
-int select args( ( int width, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout ) );
-
-#if !defined(__SVR4)
-int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
-
-#if defined(SYSV)
-int setsockopt args( ( int s, int level, int optname,
- const char *optval, int optlen ) );
-#else
-int setsockopt args( ( int s, int level, int optname, void *optval,
- int optlen ) );
-#endif
-#endif
-int socket args( ( int domain, int type, int protocol ) );
-int write args( ( int fd, char *buf, int nbyte ) );
-#endif
-
-#if defined(ultrix)
-int accept args( ( int s, struct sockaddr *addr, int *addrlen ) );
-int bind args( ( int s, struct sockaddr *name, int namelen ) );
-void bzero args( ( char *b, int length ) );
-int close args( ( int fd ) );
-int getpeername args( ( int s, struct sockaddr *name, int *namelen ) );
-int getsockname args( ( int s, struct sockaddr *name, int *namelen ) );
-int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
-int listen args( ( int s, int backlog ) );
-int read args( ( int fd, char *buf, int nbyte ) );
-int select args( ( int width, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout ) );
-int setsockopt args( ( int s, int level, int optname, void *optval,
- int optlen ) );
-int socket args( ( int domain, int type, int protocol ) );
-int write args( ( int fd, char *buf, int nbyte ) );
-#endif
-
/*
@@ -311,28 +103,14 @@
/*
- * OS-dependent local functions.
+ * Local functions
*/
-#if defined(macintosh) || defined(MSDOS)
-void game_loop_mac_msdos args( ( void ) );
-bool read_from_descriptor args( ( DESCRIPTOR_DATA *d ) );
-bool write_to_descriptor args( ( int desc, const char *txt, int length ) );
-#endif
-
-#if defined(unix)
-void game_loop_unix args( ( int control ) );
+void game_loop args( ( int control ) );
int init_socket args( ( int port ) );
void init_descriptor args( ( int control ) );
bool read_from_descriptor args( ( DESCRIPTOR_DATA *d ) );
bool write_to_descriptor args( ( int desc, const char *txt, int length ) );
-#endif
-
-
-
-/*
- * Other local functions (OS-independent).
- */
bool check_parse_name args( ( const char *name ) );
bool check_reconnect args( ( DESCRIPTOR_DATA *d, const char *name,
bool fConn ) );
@@ -350,10 +128,7 @@
{
struct timeval now_time;
int port;
-
-#if defined(unix)
int control;
-#endif
/*
* Memory debugging if needed.
@@ -370,16 +145,6 @@
strcpy( str_boot_time, ctime( ¤t_time ) );
/*
- * Macintosh console initialization.
- */
-#if defined(macintosh)
- console_options.nrows = 31;
- cshow( stdout );
- csetmode( C_RAW, stdin );
- cecho2file( "log file", 1, stderr );
-#endif
-
- /*
* Reserve one channel for our use.
*/
if ( ( fpReserve = fopen( NULL_FILE, "r" ) ) == NULL )
@@ -409,20 +174,12 @@
/*
* Run the game.
*/
-#if defined(macintosh) || defined(MSDOS)
- boot_db( );
- log_string( "Merc is ready to rock." );
- game_loop_mac_msdos( );
-#endif
-
-#if defined(unix)
control = init_socket( port );
boot_db( );
sprintf( log_buf, "ROM is ready to rock on port %d.", port );
log_string( log_buf );
- game_loop_unix( control );
+ game_loop( control );
close (control);
-#endif
/*
* That's all, folks.
@@ -434,7 +191,6 @@
-#if defined(unix)
int init_socket( int port )
{
static struct sockaddr_in sa_zero;
@@ -494,173 +250,10 @@
return fd;
}
-#endif
-
-
-
-#if defined(macintosh) || defined(MSDOS)
-void game_loop_mac_msdos( void )
-{
- struct timeval last_time;
- struct timeval now_time;
- static DESCRIPTOR_DATA dcon;
- DESCRIPTOR_DATA * d_next;
-
- gettimeofday( &last_time, NULL );
- current_time = (time_t) last_time.tv_sec;
-
- /*
- * New_descriptor analogue.
- */
- dcon.descriptor = 0;
- dcon.connected = CON_GET_NAME;
- dcon.host = str_dup( "localhost" );
- dcon.outsize = 2000;
- dcon.outbuf = alloc_mem( dcon.outsize );
- dcon.next = descriptor_list;
- dcon.showstr_head = NULL;
- dcon.showstr_point = NULL;
- descriptor_list = &dcon;
-
- /*
- * Send the greeting.
- */
- {
- extern char * help_greeting;
- if ( help_greeting[0] == '.' )
- write_to_buffer( &dcon, help_greeting+1, 0 );
- else
- write_to_buffer( &dcon, help_greeting , 0 );
- }
-
- /* Main loop */
- while ( !merc_down )
- {
- DESCRIPTOR_DATA *d;
-
- /*
- * Process input.
- */
- for ( d = descriptor_list; d != NULL; d = d_next )
- {
- d_next = d->next;
- d->fcommand = FALSE;
-
-#if defined(MSDOS)
- if ( kbhit( ) )
-#endif
- {
- if ( d->character != NULL )
- d->character->timer = 0;
- if ( !read_from_descriptor( d ) )
- {
- if ( d->character != NULL && d->connected == CON_PLAYING)
- save_char_obj( d->character );
- d->outtop = 0;
- close_socket( d );
- continue;
- }
- }
-
- if (d->character != NULL && d->character->daze > 0)
- --d->character->daze;
-
- if ( d->character != NULL && d->character->wait > 0 )
- {
- --d->character->wait;
- continue;
- }
-
- read_from_buffer( d );
- if ( d->incomm[0] != '\0' )
- {
- d->fcommand = TRUE;
- stop_idling( d->character );
-
- if ( d->connected == CON_PLAYING )
- substitute_alias( d, d->incomm );
- else
- nanny( d, d->incomm );
-
- d->incomm[0] = '\0';
- }
- }
-
-
-
- /*
- * Autonomous game motion.
- */
- update_handler( );
-
-
-
- /*
- * Output.
- */
- for ( d = descriptor_list; d != NULL; d = d_next )
- {
- d_next = d->next;
-
- if ( ( d->fcommand || d->outtop > 0 ) )
- {
- if ( !process_output( d, TRUE ) )
- {
- if ( d->character != NULL && d->connected == CON_PLAYING)
- save_char_obj( d->character );
- d->outtop = 0;
- close_socket( d );
- }
- }
- }
-
-
-
- /*
- * Synchronize to a clock.
- * Busy wait (blargh).
- */
- now_time = last_time;
- for ( ; ; )
- {
- int delta;
-
-#if defined(MSDOS)
- if ( kbhit( ) )
-#endif
- {
- if ( dcon.character != NULL )
- dcon.character->timer = 0;
- if ( !read_from_descriptor( &dcon ) )
- {
- if ( dcon.character != NULL && d->connected == CON_PLAYING)
- save_char_obj( d->character );
- dcon.outtop = 0;
- close_socket( &dcon );
- }
-#if defined(MSDOS)
- break;
-#endif
- }
-
- gettimeofday( &now_time, NULL );
- delta = ( now_time.tv_sec - last_time.tv_sec ) * 1000 * 1000
- + ( now_time.tv_usec - last_time.tv_usec );
- if ( delta >= 1000000 / PULSE_PER_SECOND )
- break;
- }
- last_time = now_time;
- current_time = (time_t) last_time.tv_sec;
- }
-
- return;
-}
-#endif
-#if defined(unix)
-void game_loop_unix( int control )
+void game_loop( int control )
{
static struct timeval null_time;
struct timeval last_time;
@@ -855,11 +448,9 @@
return;
}
-#endif
-#if defined(unix)
void init_descriptor( int control )
{
char buf[MAX_STRING_LENGTH];
@@ -960,7 +551,6 @@
return;
}
-#endif
@@ -1026,9 +616,6 @@
close( dclose->descriptor );
free_descriptor(dclose);
-#if defined(MSDOS) || defined(macintosh)
- exit(1);
-#endif
return;
}
@@ -1054,23 +641,6 @@
}
/* Snarf input. */
-#if defined(macintosh)
- for ( ; ; )
- {
- int c;
- c = getc( stdin );
- if ( c == '\0' || c == EOF )
- break;
- putc( c, stdout );
- if ( c == '\r' )
- putc( '\n', stdout );
- d->inbuf[iStart++] = c;
- if ( iStart > sizeof(d->inbuf) - 10 )
- break;
- }
-#endif
-
-#if defined(MSDOS) || defined(unix)
for ( ; ; )
{
int nRead;
@@ -1096,7 +666,6 @@
return FALSE;
}
}
-#endif
d->inbuf[iStart] = '\0';
return TRUE;
@@ -1521,11 +1090,6 @@
int nWrite;
size_t nBlock;
-#if defined(macintosh) || defined(MSDOS)
- if ( desc == 0 )
- desc = 1;
-#endif
-
if ( length <= 0 )
length = strlen(txt);
@@ -1652,9 +1216,7 @@
break;
case CON_GET_OLD_PASSWORD:
-#if defined(unix)
write_to_buffer( d, "\n\r", 2 );
-#endif
if ( strcmp( crypt( argument, ch->pcdata->pwd ), ch->pcdata->pwd ))
{
@@ -1756,9 +1318,7 @@
break;
case CON_GET_NEW_PASSWORD:
-#if defined(unix)
write_to_buffer( d, "\n\r", 2 );
-#endif
if ( strlen(argument) < 5 )
{
@@ -1787,9 +1347,7 @@
break;
case CON_CONFIRM_NEW_PASSWORD:
-#if defined(unix)
write_to_buffer( d, "\n\r", 2 );
-#endif
if ( strcmp( crypt( argument, ch->pcdata->pwd ), ch->pcdata->pwd ) )
{
@@ -2177,15 +1735,8 @@
if ( strlen(name) < 2 )
return FALSE;
-#if defined(MSDOS)
- if ( strlen(name) > 8 )
- return FALSE;
-#endif
-
-#if defined(macintosh) || defined(unix)
if ( strlen(name) > 12 )
return FALSE;
-#endif
/*
* Alphanumerics only.
@@ -2362,14 +1913,10 @@
return;
}
-#if defined(macintosh)
- send_to_char(txt,ch);
-#else
ch->desc->showstr_head = (char *)alloc_mem(strlen(txt) + 1);
strcpy(ch->desc->showstr_head,txt);
ch->desc->showstr_point = ch->desc->showstr_head;
show_string(ch->desc,"");
-#endif
}
@@ -2564,16 +2111,3 @@
return;
}
-
-
-
-/*
- * Macintosh support functions.
- */
-#if defined(macintosh)
-int gettimeofday( struct timeval *tp, void *tzp )
-{
- tp->tv_sec = time( NULL );
- tp->tv_usec = 0;
-}
-#endif
diff -buraP 009/src/const.c 011/src/const.c
--- 009/src/const.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/const.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: const.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <time.h>
#include "merc.h"
diff -buraP 009/src/db.c 011/src/db.c
--- 009/src/db.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/db.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: db.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -31,13 +35,9 @@
#include <ctype.h>
#include <time.h>
#include <unistd.h>
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
-#endif
#include "merc.h"
#include "interp.h"
@@ -47,20 +47,6 @@
#include "lookup.h"
-#if !defined(macintosh)
-extern int _filbuf args( (FILE *) );
-#endif
-
-#if !defined(OLD_RAND)
-#if !defined(linux)
-long random();
-#endif
-/* void srandom(unsigned int); */
-/* int getpid(); */
-/* time_t time(time_t *tloc); */
-#endif
-
-
/* externals for counting purposes */
extern OBJ_DATA *obj_free;
extern CHAR_DATA *char_free;
diff -buraP 009/src/db.h 011/src/db.h
--- 009/src/db.h 2008-10-08 12:07:38.000000000 -0400
+++ 011/src/db.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: db.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
diff -buraP 009/src/db2.c 011/src/db2.c
--- 009/src/db2.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/db2.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: db2.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -30,12 +34,8 @@
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include "merc.h"
#include "db.h"
@@ -69,7 +69,7 @@
temp = fread_word(fp);
if (!strcmp(temp,"#0"))
return; /* done */
-#if defined(social_debug)
+#if defined(SOCIAL_DEBUG)
else
fprintf(stderr,"%s\n\r",temp);
#endif
diff -buraP 009/src/effects.c 011/src/effects.c
--- 009/src/effects.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/effects.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: effects.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff -buraP 009/src/fight.c 011/src/fight.c
--- 009/src/fight.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/fight.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: fight.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <time.h>
diff -buraP 009/src/flags.c 011/src/flags.c
--- 009/src/flags.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/flags.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: flags.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/handler.c 011/src/handler.c
--- 009/src/handler.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/handler.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: handler.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/**************************************************************************r
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <ctype.h>
#include <stdio.h>
#include <string.h>
diff -buraP 009/src/healer.c 011/src/healer.c
--- 009/src/healer.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/healer.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: healer.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/interp.c 011/src/interp.c
--- 009/src/interp.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/interp.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: interp.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
diff -buraP 009/src/interp.h 011/src/interp.h
--- 009/src/interp.h 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/interp.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: interp.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
diff -buraP 009/src/lookup.c 011/src/lookup.c
--- 009/src/lookup.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/lookup.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: lookup.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <time.h>
#include "merc.h"
diff -buraP 009/src/lookup.h 011/src/lookup.h
--- 009/src/lookup.h 2008-10-08 12:07:38.000000000 -0400
+++ 011/src/lookup.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: lookup.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
diff -buraP 009/src/magic.c 011/src/magic.c
--- 009/src/magic.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/magic.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: magic.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff -buraP 009/src/magic.h 011/src/magic.h
--- 009/src/magic.h 2008-10-08 12:07:38.000000000 -0400
+++ 011/src/magic.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: magic.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
diff -buraP 009/src/magic2.c 011/src/magic2.c
--- 009/src/magic2.c 2008-10-08 12:07:38.000000000 -0400
+++ 011/src/magic2.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: magic2.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff -buraP 009/src/merc.h 011/src/merc.h
--- 009/src/merc.h 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/merc.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: merc.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -29,55 +33,43 @@
/*
* Accommodate old non-Ansi compilers.
*/
-#if defined(TRADITIONAL)
-#define const
-#define args( list ) ( )
-#define DECLARE_DO_FUN( fun ) void fun( )
-#define DECLARE_SPEC_FUN( fun ) bool fun( )
-#define DECLARE_SPELL_FUN( fun ) void fun( )
-#else
#define args( list ) list
#define DECLARE_DO_FUN( fun ) DO_FUN fun
#define DECLARE_SPEC_FUN( fun ) SPEC_FUN fun
#define DECLARE_SPELL_FUN( fun ) SPELL_FUN fun
-#endif
-
-
-/*
- * Short scalar types.
- * Diavolo reports AIX compiler has bugs with short types.
- */
-#if !defined(FALSE)
-#define FALSE 0
-#endif
-#if !defined(TRUE)
-#define TRUE 1
-#endif
-#if defined(_AIX)
-#if !defined(const)
-#define const
-#endif
-typedef int sh_int;
-typedef int bool;
-#define unix
-#else
typedef short int sh_int;
-#endif
/*
* Accomodate both gcc and g++
*/
#if !defined __cplusplus
+
typedef unsigned char bool;
+#if !defined TRUE
+#define TRUE 1
+#endif
#if !defined true
#define true TRUE
#endif
+#if !defined FALSE
+#define FALSE 0
+#endif
#if !defined false
#define false FALSE
#endif
+
+#else
+
+#if !defined TRUE
+#define TRUE true
+#endif
+#if !defined FALSE
+#define FALSE false
+#endif
+
#endif
@@ -1938,82 +1930,6 @@
extern WEATHER_DATA weather_info;
/*
- * OS-dependent declarations.
- * These are all very standard library functions,
- * but some systems have incomplete or non-ansi header files.
- */
-#if defined(_AIX)
-char * crypt args( ( const char *key, const char *salt ) );
-#endif
-
-#if defined(apollo)
-int atoi args( ( const char *string ) );
-void * calloc args( ( unsigned nelem, size_t size ) );
-char * crypt args( ( const char *key, const char *salt ) );
-#endif
-
-#if defined(hpux)
-char * crypt args( ( const char *key, const char *salt ) );
-#endif
-
-#if defined(linux)
-/* char * crypt args( ( const char *key, const char *salt ) ); */
-#endif
-
-#if defined(macintosh)
-#define NOCRYPT
-#if defined(unix)
-#undef unix
-#endif
-#endif
-
-#if defined(MIPS_OS)
-char * crypt args( ( const char *key, const char *salt ) );
-#endif
-
-#if defined(MSDOS)
-#define NOCRYPT
-#if defined(unix)
-#undef unix
-#endif
-#endif
-
-#if defined(NeXT)
-char * crypt args( ( const char *key, const char *salt ) );
-#endif
-
-#if defined(sequent)
-char * crypt args( ( const char *key, const char *salt ) );
-int fclose args( ( FILE *stream ) );
-int fprintf args( ( FILE *stream, const char *format, ... ) );
-int fread args( ( void *ptr, int size, int n, FILE *stream ) );
-int fseek args( ( FILE *stream, long offset, int ptrname ) );
-void perror args( ( const char *s ) );
-int ungetc args( ( int c, FILE *stream ) );
-#endif
-
-#if defined(sun)
-char * crypt args( ( const char *key, const char *salt ) );
-int fclose args( ( FILE *stream ) );
-int fprintf args( ( FILE *stream, const char *format, ... ) );
-#if defined(SYSV)
-siz_t fread args( ( void *ptr, size_t size, size_t n,
- FILE *stream) );
-#elif !defined(__SVR4)
-int fread args( ( void *ptr, int size, int n, FILE *stream ) );
-#endif
-int fseek args( ( FILE *stream, long offset, int ptrname ) );
-void perror args( ( const char *s ) );
-int ungetc args( ( int c, FILE *stream ) );
-#endif
-
-#if defined(ultrix)
-char * crypt args( ( const char *key, const char *salt ) );
-#endif
-
-
-
-/*
* The crypt(3) function is not available on some operating systems.
* In particular, the U.S. Government prohibits its export from the
* United States to foreign countries.
@@ -2036,24 +1952,10 @@
* so players can go ahead and telnet to all the other descriptors.
* Then we close it whenever we need to open a file (e.g. a save file).
*/
-#if defined(macintosh)
-#define PLAYER_DIR "" /* Player files */
-#define TEMP_FILE "romtmp"
-#define NULL_FILE "proto.are" /* To reserve one stream */
-#endif
-
-#if defined(MSDOS)
-#define PLAYER_DIR "" /* Player files */
-#define TEMP_FILE "romtmp"
-#define NULL_FILE "nul" /* To reserve one stream */
-#endif
-
-#if defined(unix)
#define PLAYER_DIR "../player/" /* Player files */
#define GOD_DIR "../gods/" /* list of gods */
#define TEMP_FILE "../player/romtmp"
#define NULL_FILE "/dev/null" /* To reserve one stream */
-#endif
#define AREA_LIST "area.lst" /* List of areas*/
#define BUG_FILE "bugs.txt" /* For 'bug' and bug()*/
diff -buraP 009/src/music.c 011/src/music.c
--- 009/src/music.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/music.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: music.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,12 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/music.h 011/src/music.h
--- 009/src/music.h 2008-10-08 12:07:38.000000000 -0400
+++ 011/src/music.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: music.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
diff -buraP 009/src/note.c 011/src/note.c
--- 009/src/note.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/note.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: note.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,12 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -42,9 +42,6 @@
#include "tables.h"
/* globals from db.c for load_notes */
-#if !defined(macintosh)
-extern int _filbuf args( (FILE *) );
-#endif
extern FILE * fpArea;
extern char strArea[MAX_INPUT_LENGTH];
diff -buraP 009/src/recycle.c 011/src/recycle.c
--- 009/src/recycle.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/recycle.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: recycle.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/recycle.h 011/src/recycle.h
--- 009/src/recycle.h 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/recycle.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: recycle.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
diff -buraP 009/src/save.c 011/src/save.c
--- 009/src/save.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/save.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: save.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <ctype.h>
#include <stdio.h>
#include <string.h>
@@ -41,10 +41,6 @@
#include "lookup.h"
#include "tables.h"
-#if !defined(macintosh)
-extern int _filbuf args( (FILE *) );
-#endif
-
/* int system(const char *command); */
/* int rename(const char *oldfname, const char *newfname); */
@@ -116,7 +112,6 @@
if ( ch->desc != NULL && ch->desc->original != NULL )
ch = ch->desc->original;
-#if defined(unix)
/* create god log */
if (IS_IMMORTAL(ch) || ch->level >= LEVEL_IMMORTAL)
{
@@ -133,7 +128,6 @@
fclose( fp );
fpReserve = fopen( NULL_FILE, "r" );
}
-#endif
fclose( fpReserve );
sprintf( strsave, "%s%s", PLAYER_DIR, capitalize( ch->name ) );
@@ -573,7 +567,6 @@
found = FALSE;
fclose( fpReserve );
- #if defined(unix)
/* decompress if .gz file exists */
sprintf( strsave, "%s%s%s", PLAYER_DIR, capitalize(name),".gz");
if ( ( fp = fopen( strsave, "r" ) ) != NULL )
@@ -582,7 +575,6 @@
sprintf(buf,"gzip -dfq %s",strsave);
system(buf);
}
- #endif
sprintf( strsave, "%s%s", PLAYER_DIR, capitalize( name ) );
if ( ( fp = fopen( strsave, "r" ) ) != NULL )
diff -buraP 009/src/scan.c 011/src/scan.c
--- 009/src/scan.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/scan.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: scan.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff -buraP 009/src/skills.c 011/src/skills.c
--- 009/src/skills.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/skills.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: skills.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,13 +29,8 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
#include <sys/time.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff -buraP 009/src/special.c 011/src/special.c
--- 009/src/special.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/special.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: special.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,12 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#include <time.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff -buraP 009/src/tables.c 011/src/tables.c
--- 009/src/tables.c 2008-10-08 12:07:38.000000000 -0400
+++ 011/src/tables.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: tables.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <time.h>
#include "merc.h"
diff -buraP 009/src/tables.h 011/src/tables.h
--- 009/src/tables.h 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/tables.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: tables.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
diff -buraP 009/src/telnet.h 011/src/telnet.h
--- 009/src/telnet.h 2008-10-08 12:07:38.000000000 -0400
+++ 011/src/telnet.h 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: telnet.h 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/* @(#)telnet.h 1.7 88/08/19 SMI; from UCB 5.1 5/30/85 */
/*
* Copyright (c) 1983 Regents of the University of California.
diff -buraP 009/src/update.c 011/src/update.c
--- 009/src/update.c 2008-10-08 12:45:25.000000000 -0400
+++ 011/src/update.c 2008-10-09 05:48:15.000000000 -0400
@@ -1,3 +1,7 @@
+/*
+ * RAM $Id: update.c 11 2008-10-09 09:48:15Z quixadhal $
+ */
+
/***************************************************************************
* Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, *
* Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. *
@@ -25,11 +29,7 @@
* ROM license, in the file Rom24/doc/rom.license *
***************************************************************************/
-#if defined(macintosh)
-#include <types.h>
-#else
#include <sys/types.h>
-#endif
#include <stdio.h>
#include <string.h>
#include <time.h>