/* * Maximum number of bits in a bit field. They are stored in printable * strings, 6 bits per byte. */ #define MAX_BITS 2400 /* * There is a hash table for living objects, used by find_living(). */ #define LIVING_HASH_SIZE 100 /* * Define REAL_CATCH if you want catch to catch statements and not * merely expressions. */ #define REAL_CATCH /* * Set MUD_LIB to the directory which contains the mud data. */ #define MUD_LIB "mudlib" /* * The following is the secure directory where secure files are to be kept */ #define SECURE_DIR "secure" /* * This is the file which contains names of objects to be * loaded initially. Do not normally change this. */ #define INIT_FILE "room/init_file" /* * This is the subdirectory where all wizards objects are defined. */ #define PLAYER_DIR "players" /* * This is the castle that a wiz gets a copy of. */ #define DEFAULT_CASTLE "room/def_castle.c" /* * A command to run the C preprocessor on a C file (or really, an * object definition file). */ /* #define PRE_COMPILE "/lib/cpp -I/mud/testmud/secure -Iroom -Iobj" */ #define PRE_COMPILE "gnucpp -v" /* * Max number of local variables in a function. */ #define MAX_LOCAL 30 /* * A command that lists files in a directory. * Note that we need the path since vpopen doesn't glob. * Comment this out if you want to use a faster in-game ls that will * not show nearly as many features. */ /* #define LIST_FILES "/bin/ls -CFAs" */ /* * Define what ioctl to use against tty's. */ #define USE_TIOCGETP /* BSD */ /* #define USE_TCGETA /* SYSV */ /* Maximum number of evaluated nodes/loop. * If this is exceeded, current function is halted. * The worst case yet encountered is over 9000. */ #define MAX_COST (20 * 4000) /* Use fork or vfork to exec a program. * Default is fork(). */ #define USE_VFORK /* * Objects are swapped out if they are not used. * Specify how many resets the object can stay non-referenced until * it is swapped out. * A value if '1' will make swap out the object at every reset. * A value of '0' will never swap out the object. * THe value '2' is recommended if you choose to use swapping. * The count will be cleared by either call_other() or move_object(). * * NOTE: Swapping was not considered bug free at release. At Genesis, we * use it just the same, becuase of too little memory. Go ahead and try * using it if you feel it is needed on your machine. * * Note 2: swapping is bug free :-). And this number is now settable * at runtime; it starts off at this value. */ #define NUM_RESET_TO_SWAP 2 /* * define RECOMPILE_SWAP to 1 if you want to free programs and recompile * them instead of swaping them, zero otherwise. If you make it 0, and * the swap file is bad, it will automatically fall back to recompiling them. * This is the default; it is also settable at runtime. */ #define RECOMPILE_SWAP 0 /* * We do swap file "garbage collection" as soon as the swap file reaches * SWAP_MAX_PURGE_SIZE, and also if it is over SWAP_MIN_PURGE_SIZE and there * are more than SWAP_PERC_HOLES in the file. These values are not critical, * except for the max size. Garbage collection means deleting the swap file * and starting anew, recompiling swapped objects if they are required. */ #define SWAP_MAX_PURGE_SIZE 1000000 #define SWAP_MIN_PURGE_SIZE 100000 #define SWAP_PERC_HOLES 0.8 /* * Where to swap out objects. This directory is not used if NUM_RESET_TO_SWAP * is 0 and swapping has not been turned on by a wizard with ALL_POWER. */ #define SWAP_FILE "secure/LpSwap" /* * To speed the start of the game up, i-files are saved. This * requires more disk space (a lot more). If the i-file is not * wanted, define this next symbol. */ /*#define REMOVE_I_FILES*/ /* * Which port to use on this host. The #ifndef is so that we can define * a different port with a -D option to the compiler. */ #ifndef PORTNUM #define PORTNUM 2222 #endif /* * This is the maximum array size allowed for a single array. */ #define MAX_ARRAY_SIZE 1000 /* * Minutes until a reset pulse is sent. Make this number small (about * 15) when there are few wizards, large (45-60) when there are more * wizards. */ #define RESET_TIME 35 /* testing */ /* * Define this to be the file that holds all the processes accounting for the * mud. This file is the same as the one is all the shell scripts. */ #define PROCSFILE ".procs" /* * Define this to be the maximum number of players you will allow on your mud. */ #define MAX_PLAYERS 36 /* * Define this to be the maximum number of lines printed in a cat or similar * operation before ***TRUNCATED*** is printed. */ #define MAX_LINES 35 /* * This is the directory to put the lockout file in */ #define LOCKOUT_FILE "secure/ACCESS.DENY" /* * When uploading files, we want fast response; however, normal players * shouldn't be able to hog the system in this way. Define ALLOWED_ED_CMDS * to be the ratio of the no of ed cmds executed per player cmd, and * MAX_CMDS_PER_BEAT to be the bax no of buffered player commands the * system will accept in each heartbeat interval. */ #define ALLOWED_ED_CMDS 25 #define MAX_CMDS_PER_BEAT 7 /* not implemented yet :-( */ /* * This is the maximum recursion depth allowed by the game. * Note: if you use -DTRACE, the depth will most likely be much * less than this. */ #define MAX_RECURSION 60 /* * These are the maximum size of the buffers for incoming and outgoing * messages, and also the maximum length (+1) of a single incoming command - * if a line is longer than MAX_TEXT_IN, it will be truncated and sent * on to the parser as a whole line, and the rest of the line will be handled * as a new command. Currently, if more than MAX_TEXT_OUT bytes are * written in a single add_message, they are truncated; this may change in * the future. */ #define MAX_TEXT_IN 1024 #define MAX_TEXT_OUT (10000) /* * Define the following if you want to check for .. or leading / in * filenames for inclusion with cpp. Will also make sure that * including other files when you are not allowed (via level) fails. */ #define SECURE_CPP /* */ /* * Reserve an extra memory area from malloc(), to free when we run out * of memory to get some warning and start Armageddon. * If this value is 0, no area will be reserved. */ #define RESERVED_SIZE 400000 /* Define the size of the shared string hash table. This number should * a prime, probably between 1000 and 30000; if you set it to about 1/5 * of the number of distinct strings you have, you will get a hit ratio * (number of comparisons to find a string) very close to 1, as found strings * are automatically moved to the head of a hash chain. You will never * need more, and you will still get good results with a smaller table. */ #define HTABLE_SIZE 2203 /* there is a table of some primes too */ /* * Object hash table size. * Define this like you did with the strings; probably set to about 1/4 of * the number of objects in a game, as the distribution of accesses to * objects is somewhat more uniform than that of strings. */ #define OTABLE_SIZE 950 /* we have several thousand obs usually */ /* * Define the following if you want to change the name of debug.log * (for example, if you don't want the hostname prepended to the file * name) */ #define DEBUG_LOG "error.log" /*****************************************************************************/ /* END OF CONFIG -- DO NOT ALTER ANYTHING BELOW THIS LINE */ /*****************************************************************************/ /* * some generic large primes used by various hash functions in different files * These are not critical. */ #define P1 701 /* 3 large, different primes */ #define P2 14009 /* There's a file of them here somewhere :-) */ #define P3 54001 extern char *xalloc(), *find_string_space(), *query_ip_number(), *strchr(), *strrchr(), *strcpy(), *strncpy(), *crypt(); /*****************************************************************************/