mux/src/config.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SIDE_EFFECT_FUNCTIONS
#define PLAYER_NAME_LIMIT   22
#define NUM_ENV_VARS   10
#define MAX_ARG   100
#define MAX_GLOBAL_REGS   36
#define OUTPUT_BLOCK_SIZE   16384
#define MANDFLAGS   (V_LINK|V_PARENT|V_XFLAGS|V_ZONE|V_POWERS|V_3FLAGS|V_QUOTED)
#define OFLAGS   (V_DATABASE|V_ATRKEY|V_ATRNAME|V_ATRMONEY)
#define OUTPUT_VERSION   1
#define OUTPUT_FLAGS   (MANDFLAGS|OFLAGS)
#define UNLOAD_VERSION   1
#define UNLOAD_FLAGS   (MANDFLAGS)
#define MIN_SUPPORTED_VERSION   1
#define MAX_SUPPORTED_VERSION   2
#define NOT_TOKEN   '!'
#define AND_TOKEN   '&'
#define OR_TOKEN   '|'
#define LOOKUP_TOKEN   '*'
#define NUMBER_TOKEN   '#'
#define INDIR_TOKEN   '@'
#define CARRY_TOKEN   '+'
#define IS_TOKEN   '='
#define OWNER_TOKEN   '$'
#define AMATCH_CMD   '$'
#define AMATCH_LISTEN   '^'
#define EXIT_DELIMITER   ';'
#define ARG_DELIMITER   '='
#define ARG_LIST_DELIM   ','
#define NULL_DELIM_VAR   "@@"
#define INDENT_STR   " "
#define OBJECT_ENDOWMENT(cost)   (((cost)/mudconf.sacfactor) + mudconf.sacadjust)
#define OBJECT_DEPOSIT(pennies)   (((pennies) - mudconf.sacadjust)* mudconf.sacfactor)
#define DCL_CDECL
#define DCL_INLINE   inline
#define INVALID_HANDLE_VALUE   (-1)
#define O_BINARY   0
#define INT64_MAX_VALUE   9223372036854775807LL
#define INT64_MIN_VALUE   (-9223372036854775807LL - 1)
#define UINT64_MAX_VALUE   0xffffffffffffffffULL
#define SIZEOF_PATHNAME   (4095 + 1)
#define SOCKET_WRITE(s, b, n, f)   write(s,b,n)
#define SOCKET_READ(s, b, n, f)   read(s,b,n)
#define SOCKET_CLOSE(s)   close(s)
#define IS_SOCKET_ERROR(cc)   ((cc) < 0)
#define IS_INVALID_SOCKET(s)   ((s) < 0)
#define SOCKET_LAST_ERROR   (errno)
#define SOCKET_EINTR   (EINTR)
#define SOCKET_EWOULDBLOCK   (EWOULDBLOCK)
#define SOCKET_EBADF   (EBADF)
#define INVALID_SOCKET   (-1)
#define SD_BOTH   (2)
#define isTRUE(x)   ((x) != 0)
#define INT32_MIN_VALUE   (-2147483647 - 1)
#define INT32_MAX_VALUE   2147483647
#define UINT32_MAX_VALUE   0xFFFFFFFFU
#define INT16_MIN_VALUE   (-32768)
#define INT16_MAX_VALUE   32767
#define UINT16_MAX_VALUE   0xFFFFU
#define LARGEST_INT_LTE_NEG_QUOTIENT
#define mux_assert(exp)   (void)( (exp) || (AssertionFailed(__FILE__, __LINE__), 0) )
#define ISOUTOFMEMORY(exp)   {if (!(exp)) { OutOfMemory(__FILE__, __LINE__); }}
#define MEMALLOC(n)   malloc((n))
#define MEMFREE(p)   free((p))
#define MEMREALLOC(p, n)   realloc((p),(n))

Typedefs

typedef int HANDLE
typedef long long INT64
typedef unsigned long long UINT64
typedef int SOCKET
typedef INT64 INT32
typedef UINT64 UINT32
typedef INT32 INT16
typedef UINT32 UINT16
typedef signed char INT8
typedef unsigned char UINT8
typedef UINT32 in_addr_t

Functions

bool AssertionFailed (const char *SourceFile, unsigned int LineNo)
void OutOfMemory (const char *SourceFile, unsigned int LineNo)


Define Documentation

#define AMATCH_CMD   '$'

Definition at line 52 of file config.h.

Referenced by atr_add(), atr_match(), atr_match1(), Commer(), Hearer(), look_atrs1(), process_cmdent(), process_command(), and sweep_check().

#define AMATCH_LISTEN   '^'

Definition at line 53 of file config.h.

Referenced by atr_add(), atr_match(), atr_match1(), Commer(), Hearer(), look_atrs1(), notify_check(), and sweep_check().

#define AND_TOKEN   '&'

Definition at line 42 of file config.h.

Referenced by getboolexp1(), parse_boolexp_L(), parse_boolexp_T(), putbool_subexp(), and unparse_boolexp1().

#define ARG_DELIMITER   '='

Definition at line 57 of file config.h.

#define ARG_LIST_DELIM   ','

Definition at line 58 of file config.h.

#define CARRY_TOKEN   '+'

Definition at line 47 of file config.h.

Referenced by getboolexp1(), parse_boolexp_F(), putbool_subexp(), and unparse_boolexp1().

#define DCL_CDECL

Definition at line 106 of file config.h.

#define DCL_INLINE   inline

Definition at line 107 of file config.h.

#define EXIT_DELIMITER   ';'

Definition at line 56 of file config.h.

Referenced by do_decomp(), and matches_exit_from_list().

#define INDENT_STR   " "

Definition at line 66 of file config.h.

#define INDIR_TOKEN   '@'

Definition at line 46 of file config.h.

Referenced by eval_boolexp(), getboolexp1(), parse_boolexp_F(), putbool_subexp(), and unparse_boolexp1().

#define INT16_MAX_VALUE   32767

Definition at line 206 of file config.h.

#define INT16_MIN_VALUE   (-32768)

Definition at line 205 of file config.h.

#define INT32_MAX_VALUE   2147483647

Definition at line 174 of file config.h.

Referenced by FUNCTION(), RandomINT32(), and time_t_largest().

#define INT32_MIN_VALUE   (-2147483647 - 1)

Definition at line 173 of file config.h.

Referenced by time_t_smallest().

#define INT64_MAX_VALUE   9223372036854775807LL

Definition at line 116 of file config.h.

Referenced by ParseFractionalSecondsString(), and time_t_largest().

#define INT64_MIN_VALUE   (-9223372036854775807LL - 1)

Definition at line 117 of file config.h.

Referenced by ParseFractionalSecondsString(), and time_t_smallest().

#define INVALID_HANDLE_VALUE   (-1)

Definition at line 108 of file config.h.

Referenced by CLogFile::AppendLogFile(), CLogFile::CLogFile(), CHashFile::CloseAll(), CLogFile::CloseLogFile(), CHashFile::CreateFileSet(), CHashFile::Init(), make_socket(), CHashFile::Open(), CHashFile::Sync(), and CHashFile::WriteDirectory().

#define INVALID_SOCKET   (-1)

Definition at line 138 of file config.h.

Referenced by CleanUpSlaveSocket(), close_sockets(), make_socket(), new_connection(), and SetupPorts().

#define IS_INVALID_SOCKET (  )     ((s) < 0)

Definition at line 130 of file config.h.

Referenced by CleanUpSlaveSocket(), make_socket(), new_connection(), shovechars(), and SiteMonSend().

#define IS_SOCKET_ERROR ( cc   )     ((cc) < 0)

Definition at line 129 of file config.h.

Referenced by close_sockets(), make_nolinger(), make_nonblocking(), make_socket(), process_input(), process_output(), and shovechars().

#define IS_TOKEN   '='

Definition at line 48 of file config.h.

Referenced by getboolexp1(), parse_boolexp_F(), putbool_subexp(), and unparse_boolexp1().

#define ISOUTOFMEMORY ( exp   )     {if (!(exp)) { OutOfMemory(__FILE__, __LINE__); }}

Definition at line 224 of file config.h.

Referenced by add_helpfile(), add_player_name(), add_to_output_queue(), al_extend(), anum_extend(), atr_add_raw_LEN(), atr_head(), badname_add(), Balloc(), CF_HAND(), cf_init(), cf_read(), create_new_comsys(), db_grow(), dbclean_RenumberAttributes(), do_addcom(), do_addcommand(), do_asort(), do_chanlist(), do_createchannel(), do_function(), do_joinchannel(), do_mail_debug(), do_malias_create(), do_prog(), CHashFile::DoubleDirectory(), FUNCTION(), fwdlist_set(), helpindex_read(), init_cmdtab(), CHashFile::InitCache(), CHashFile::InitializeDirectory(), load_channels(), load_comsystem(), load_mail_V5(), mail_db_grow(), malias_read(), mux_exec(), olist_push(), pool_alloc(), pool_alloc_lbuf(), CBitField::Resize(), send_mail(), setup_que(), store_string(), StringCloneLen(), and vattr_define_LEN().

#define isTRUE (  )     ((x) != 0)

Definition at line 143 of file config.h.

Referenced by CF_HAND(), and FUNCTION().

#define LARGEST_INT_LTE_NEG_QUOTIENT

Definition at line 217 of file config.h.

#define LOOKUP_TOKEN   '*'

Definition at line 44 of file config.h.

Referenced by lookup_player(), and match_player().

#define MANDFLAGS   (V_LINK|V_PARENT|V_XFLAGS|V_ZONE|V_POWERS|V_3FLAGS|V_QUOTED)

Definition at line 24 of file config.h.

Referenced by db_read(), and info().

#define MAX_ARG   100

Definition at line 15 of file config.h.

Referenced by default_handler(), mux_exec(), and process_cmdent().

#define MAX_GLOBAL_REGS   36

Definition at line 16 of file config.h.

Referenced by add_prefix(), cf_init(), check_filter(), did_it(), do_command(), do_prog(), do_quitprog(), do_ufun(), eval_boolexp(), FUNCTION(), handle_prog(), look_contents(), look_exits(), look_in(), main(), mux_exec(), process_hook(), real_regmatch(), real_regrab(), restore_global_regs(), save_and_clear_global_regs(), save_global_regs(), setup_que(), shutdownsock(), and Task_RunQueueEntry().

#define MAX_SUPPORTED_VERSION   2

Definition at line 38 of file config.h.

Referenced by db_read().

#define MEMALLOC (  )     malloc((n))

Definition at line 238 of file config.h.

Referenced by add_helpfile(), add_player_name(), add_to_output_queue(), al_extend(), anum_extend(), atr_add_raw_LEN(), atr_head(), badname_add(), Balloc(), cache_get(), cache_put(), CF_HAND(), cf_init(), cf_read(), create_new_comsys(), db_grow(), dbclean_RenumberAttributes(), do_addcom(), do_addcommand(), do_asort(), do_chanlist(), do_createchannel(), do_function(), do_joinchannel(), do_mail_debug(), do_malias_create(), do_prog(), FUNCTION(), fwdlist_set(), helpindex_read(), init_cmdtab(), load_channels(), load_comsystem(), load_mail_V5(), mail_db_grow(), malias_read(), mux_exec(), olist_push(), pool_alloc(), pool_alloc_lbuf(), CBitField::Resize(), send_mail(), setup_que(), CGuests::SizeGuests(), store_string(), StringCloneLen(), and vattr_define_LEN().

#define MEMFREE (  )     free((p))

Definition at line 239 of file config.h.

Referenced by add_helpfile(), add_player_name(), al_extend(), anum_extend(), atr_add_raw_LEN(), atr_clr(), atr_free(), atr_next(), atr_pop(), badname_remove(), cache_del(), cache_put(), CallBack_HaltQueue(), CallBack_NotifySemaphoreDrainOrAll(), CF_HAND(), cf_read(), check_filter(), db_free(), db_grow(), dbclean_RemoveStaleAttributeNames(), dbclean_RenumberAttributes(), delete_player_name(), destroy_comsys(), do_addcom(), do_asort(), do_channelnuke(), do_createchannel(), do_delcom(), do_delcomchannel(), do_delcommand(), do_destroychannel(), do_flag(), do_joinchannel(), do_mail_debug(), do_malias_create(), do_malias_desc(), do_malias_rename(), do_quitprog(), do_setnewtitle(), flag_rename(), free_boolexp(), freeqs(), FUNCTION(), fwdlist_clr(), fwdlist_set(), handle_prog(), helpindex_clean(), helpindex_read(), mail_db_grow(), MessageReferenceCheck(), Moniker(), mux_exec(), olist_pop(), pool_reset(), process_output(), queue_write_LEN(), real_regmatch(), real_regrab(), regexp_match(), MailList::RemoveAll(), MailList::RemoveItem(), CBitField::Resize(), s_Moniker(), s_Name(), CLogFile::SetBasename(), shutdownsock(), CGuests::SizeGuests(), stack_clr(), TrimCache(), vattr_delete_LEN(), CBitField::~CBitField(), and CGuests::~CGuests().

#define MEMREALLOC ( p,
 )     realloc((p),(n))

Definition at line 240 of file config.h.

#define MIN_SUPPORTED_VERSION   1

Definition at line 37 of file config.h.

Referenced by db_read().

#define mux_assert ( exp   )     (void)( (exp) || (AssertionFailed(__FILE__, __LINE__), 0) )

Definition at line 221 of file config.h.

Referenced by atr_clr(), cache_pass2(), cache_redirect(), db_read(), eval_boolexp(), getboolexp(), getboolexp1(), load_channels(), load_comsystem(), load_restart_db(), process_command(), and Task_RunQueueEntry().

#define NOT_TOKEN   '!'

Definition at line 41 of file config.h.

Referenced by do_set(), FUNCTION(), getboolexp1(), parse_boolexp_F(), and putbool_subexp().

#define NULL_DELIM_VAR   "@@"

Definition at line 62 of file config.h.

Referenced by delim_check().

#define NUM_ENV_VARS   10

Definition at line 14 of file config.h.

Referenced by atr_match1(), notify_check(), process_cmdent(), and setup_que().

#define NUMBER_TOKEN   '#'

Definition at line 45 of file config.h.

Referenced by absolute_name(), autodetect_list(), do_mail_stats(), FUNCTION(), get_exit_dest(), lookup_player(), and parse_range().

#define O_BINARY   0

Definition at line 110 of file config.h.

Referenced by CLogFile::AppendLogFile(), CHashFile::CreateFileSet(), CLogFile::CreateLogFile(), do_shutdown(), fcache_read(), and CHashFile::Open().

#define OBJECT_DEPOSIT ( pennies   )     (((pennies) - mudconf.sacadjust)* mudconf.sacfactor)

Definition at line 72 of file config.h.

Referenced by destroy_obj(), do_chown(), do_clone(), and do_decomp().

#define OBJECT_ENDOWMENT ( cost   )     (((cost)/mudconf.sacfactor) + mudconf.sacadjust)

Definition at line 69 of file config.h.

Referenced by check_dead_refs(), create_obj(), and do_clone().

#define OFLAGS   (V_DATABASE|V_ATRKEY|V_ATRNAME|V_ATRMONEY)

Definition at line 25 of file config.h.

#define OR_TOKEN   '|'

Definition at line 43 of file config.h.

Referenced by getboolexp1(), parse_boolexp_E(), parse_boolexp_L(), putbool_subexp(), and unparse_boolexp1().

#define OUTPUT_BLOCK_SIZE   16384

Definition at line 18 of file config.h.

Referenced by add_to_output_queue().

#define OUTPUT_FLAGS   (MANDFLAGS|OFLAGS)

Definition at line 31 of file config.h.

Referenced by dbconvert(), and dump_database_internal().

#define OUTPUT_VERSION   1

Definition at line 27 of file config.h.

Referenced by dbconvert(), and dump_database_internal().

#define OWNER_TOKEN   '$'

Definition at line 49 of file config.h.

Referenced by getboolexp1(), parse_boolexp_F(), putbool_subexp(), and unparse_boolexp1().

#define PLAYER_NAME_LIMIT   22

Definition at line 13 of file config.h.

Referenced by do_mail_list(), do_mail_proof(), do_mail_read(), do_mail_review(), and ValidatePlayerName().

#define SD_BOTH   (2)

Definition at line 139 of file config.h.

Referenced by CleanUpSlaveSocket(), close_sockets(), and new_connection().

#define SIDE_EFFECT_FUNCTIONS

Definition at line 11 of file config.h.

#define SIZEOF_PATHNAME   (4095 + 1)

Definition at line 124 of file config.h.

Referenced by dbconvert(), dump_database_internal(), load_game(), and CLogFile::SetPrefix().

#define SOCKET_CLOSE (  )     close(s)

Definition at line 128 of file config.h.

Referenced by close_sockets(), make_socket(), new_connection(), and SetupPorts().

#define SOCKET_EBADF   (EBADF)

Definition at line 137 of file config.h.

Referenced by shovechars().

#define SOCKET_EINTR   (EINTR)

Definition at line 132 of file config.h.

Referenced by process_input(), and shovechars().

#define SOCKET_EWOULDBLOCK   (EWOULDBLOCK)

Definition at line 133 of file config.h.

Referenced by get_slave_result(), process_input(), and process_output().

#define SOCKET_LAST_ERROR   (errno)

Definition at line 131 of file config.h.

Referenced by get_slave_result(), make_socket(), new_connection(), process_input(), process_output(), and shovechars().

#define SOCKET_READ ( s,
b,
n,
 )     read(s,b,n)

Definition at line 127 of file config.h.

Referenced by process_input().

#define SOCKET_WRITE ( s,
b,
n,
 )     write(s,b,n)

Definition at line 126 of file config.h.

Referenced by close_sockets(), fcache_rawdump(), and process_output().

#define UINT16_MAX_VALUE   0xFFFFU

Definition at line 207 of file config.h.

#define UINT32_MAX_VALUE   0xFFFFFFFFU

Definition at line 175 of file config.h.

Referenced by RandomINT32().

#define UINT64_MAX_VALUE   0xffffffffffffffffULL

Definition at line 118 of file config.h.

Referenced by FUNCTION().

#define UNLOAD_FLAGS   (MANDFLAGS)

Definition at line 35 of file config.h.

Referenced by dbconvert().

#define UNLOAD_VERSION   1

Definition at line 34 of file config.h.

Referenced by dbconvert().


Typedef Documentation

typedef int HANDLE

Definition at line 112 of file config.h.

typedef UINT32 in_addr_t

Definition at line 213 of file config.h.

typedef INT32 INT16

Definition at line 199 of file config.h.

typedef INT64 INT32

Definition at line 167 of file config.h.

typedef long long INT64

Definition at line 114 of file config.h.

typedef signed char INT8

Definition at line 209 of file config.h.

typedef int SOCKET

Definition at line 120 of file config.h.

typedef UINT32 UINT16

Definition at line 200 of file config.h.

typedef UINT64 UINT32

Definition at line 168 of file config.h.

typedef unsigned long long UINT64

Definition at line 115 of file config.h.

typedef unsigned char UINT8

Definition at line 210 of file config.h.


Function Documentation

bool AssertionFailed ( const char *  SourceFile,
unsigned int  LineNo 
)

Definition at line 2630 of file predicates.cpp.

References statedata::bCanRestart, statedata::bStandAlone, do_restart(), ENDLINE, CLogFile::Flush(), GOD, Log, mudstate, and CLogFile::tinyprintf().

02631 {
02632     Log.tinyprintf("%s(%u): Assertion failed." ENDLINE, SourceFile, LineNo);
02633     Log.Flush();
02634     if (  !mudstate.bStandAlone
02635        && mudstate.bCanRestart)
02636     {
02637         do_restart(GOD, GOD, GOD, 0);
02638     }
02639     else
02640     {
02641         abort();
02642     }
02643     return false;
02644 }

void OutOfMemory ( const char *  SourceFile,
unsigned int  LineNo 
)

Definition at line 2612 of file predicates.cpp.

References statedata::bCanRestart, statedata::bStandAlone, do_restart(), ENDLINE, CLogFile::Flush(), GOD, Log, mudstate, and CLogFile::tinyprintf().

02613 {
02614     Log.tinyprintf("%s(%u): Out of memory." ENDLINE, SourceFile, LineNo);
02615     Log.Flush();
02616     if (  !mudstate.bStandAlone
02617        && mudstate.bCanRestart)
02618     {
02619         do_restart(GOD, GOD, GOD, 0);
02620     }
02621     else
02622     {
02623         abort();
02624     }
02625 }


Generated on Mon May 28 04:40:14 2007 for MUX by  doxygen 1.4.7