/* config.h */ /* this header file contains certain system configuration information */ #include "stddef.h" /* system include files & extern decl's */ #define MAX_CONNS 512 /* max # players that can be connected at one time */ #define MIN_FREE_FILES 3 /* at least this many files are GUARANTEED to be openable by CI objects while the system is running. 3 is a good number. */ #define WRITE_BURST 256 /* number of characters to write over the net at a time */ #define MULTI 0 #define SINGLE 1 #define DEFAULT_INTERFACE MULTI /* the default interface type */ #define ITOA_BUFSIZ 32 /* max # chars a signed long will take in string form - 32 will cover the max size of a 96-bit signed integer */ #define NUM_ELINES 32 /* number of lines in a block of edit buffer */ #define MAX_OUTBUF_LEN 8167 /* maximum amount of output buffered */ #define PORT 5000 /* default inet port number */ /* directory with the ci programs' source code (not the server source) */ #define MUDLIB_PATH "ci.dir" #define INCLUDE_PATH "/include" /* appended to CI_PATH and prepended to included files */ /* file where system messages are recorded - probably best not to put it in MUDLIB_PATH */ #define SYSLOG_PATH "syslog" /* the cache file - best not to put it in MUDLIB_PATH */ #define CACHE_PATH "cache" #define TMPDB_PATH "ci.tmp.db" /* default loaded ci database */ #define DEFAULT_LOAD "std.db" /* default saved ci database */ #define DEFAULT_SAVE "std.db" /* default panic database */ #define DEFAULT_PANIC "panic.db" #define OBJ_ALLOC_BLKSIZ 1024 /* chunk-size for object allocation */ #define CACHE_SIZE 1024 /* number of objects to keep in the cache at one time. it's a soft maximum, can be temporarily overridden */ #define CACHE_HASH 256 /* the size of the hash table to hash cached objects into */ #define MAX_STR_LEN 1023 /* maximum string variable length */ /* applies only to constants while compiling */ /* no maximum is applied to strings constructed */ /* during run-time execution */ #define MAX_CACHEFILE_SIZE 64000 /* the size the cache file must reach before the system auto-saves */ #define EBUFSIZ 2047 /* #define expansion buffer size */ #define MAX_DEPTH 8 /* maximum #define recursion */ #define DB_IDENSTR "CI database\n" /* string stuck at beginning of db file */ /* the flags on objects */ #define GARBAGE 1 #define INTERACTIVE 2 #define CONNECTED 4 #define PROTOTYPE 8 #define IN_EDITOR 16 #define PRIV 32 #define RESIDENT 64 /* the flags on files */ #define READ_OK 1 #define WRITE_OK 2 #define DIRECTORY 4 #define MALLOC(SIZE_) malloc(SIZE_) #define FREE(POINTER_) free(POINTER_) #define digit_value(X) ((X)-'0') #define int2time(X) ((time_t) X) #define time2int(X) ((long) X)