src/config.h File Reference

#include "copyright.h"
#include "autoconf.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/fcntl.h>
#include <sys/types.h>
#include <ctype.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <varargs.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include "debug.h"
#include <event.h>

Include dependency graph for config.h:

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

Go to the source code of this file.

Defines

#define _GNU_SOURCE
#define CONF_FILE   "netmux.conf"
#define FILEDIR   "files/"
#define SIDE_EFFECT_FUNCTIONS
#define ENTERLEAVE_PARANOID
#define PLAYER_NAME_LIMIT   22
#define NUM_ENV_VARS   10
#define MAX_ARG   100
#define MAX_GLOBAL_REGS   10
#define HASH_FACTOR   16
#define PLUSHELP_COMMAND   "+help"
#define OUTPUT_BLOCK_SIZE   16384
#define StringCopy   strcpy
#define StringCopyTrunc   strncpy
#define CHANNEL_HISTORY
#define CHANNEL_HISTORY_LEN   20
#define COMMAND_HISTORY_LEN   10
#define MANDFLAGS   (V_LINK|V_PARENT|V_XFLAGS|V_ZONE|V_POWERS|V_3FLAGS|V_QUOTED)
#define OFLAGS1   (V_GDBM|V_ATRKEY)
#define OFLAGS2   (V_ATRNAME|V_ATRMONEY)
#define OUTPUT_VERSION   1
#define OUTPUT_FLAGS   (MANDFLAGS)
#define UNLOAD_VERSION   1
#define UNLOAD_OUTFLAGS   (MANDFLAGS)
#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 BOUND_VAR   "##"
#define LISTPLACE_VAR   "#@"
#define OBJECT_ENDOWMENT(cost)   (((cost)/mudconf.sacfactor) +mudconf.sacadjust)
#define OBJECT_DEPOSIT(pennies)   (((pennies)-mudconf.sacadjust)*mudconf.sacfactor)
#define DEV_NULL   "/dev/null"
#define READ   read
#define WRITE   write
#define XMALLOC(x, y)   (char *)malloc((x))
#define XFREE(x, y)   (free((x)), (x) = NULL)
#define ENTER_REQUIRES_LEAVESUCC
#define LEAVE_REQUIRES_ENTERSUCC
#define EVAL_ALL_NEWS   1
#define random   rand
#define srandom   srand

Typedefs

typedef int dbref
typedef int FLAG
typedef int POWER
typedef char boolexp_type
typedef char IBUF [16]

Functions

size_t strnlen (const char *s, size_t maxlen)
char * strndup (const char *s, size_t n)
int posix_memalign (void **memptr, size_t alignment, size_t size)
size_t strlcat (char *, const char *, size_t)
size_t strlcpy (char *, const char *, size_t)


Define Documentation

#define _GNU_SOURCE

Definition at line 9 of file config.h.

#define AMATCH_CMD   '$'

Definition at line 116 of file config.h.

Referenced by process_command().

#define AMATCH_LISTEN   '^'

Definition at line 117 of file config.h.

Referenced by Hearer(), notify_checked(), and sweep_check().

#define AND_TOKEN   '&'

Definition at line 106 of file config.h.

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

#define ARG_DELIMITER   '='

Definition at line 121 of file config.h.

Referenced by ok_name().

#define ARG_LIST_DELIM   ','

Definition at line 122 of file config.h.

#define BOUND_VAR   "##"

Definition at line 129 of file config.h.

Referenced by bind_and_queue(), fun_iter(), fun_list(), fun_parse(), and search_perform().

#define CARRY_TOKEN   '+'

Definition at line 111 of file config.h.

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

#define CHANNEL_HISTORY

Definition at line 83 of file config.h.

#define CHANNEL_HISTORY_LEN   20

Definition at line 84 of file config.h.

Referenced by do_comprintf(), and do_comsend().

#define COMMAND_HISTORY_LEN   10

Definition at line 85 of file config.h.

#define CONF_FILE   "netmux.conf"

Definition at line 59 of file config.h.

Referenced by main().

#define DEV_NULL   "/dev/null"

Definition at line 140 of file config.h.

#define ENTER_REQUIRES_LEAVESUCC

Definition at line 162 of file config.h.

#define ENTERLEAVE_PARANOID

Definition at line 65 of file config.h.

#define EVAL_ALL_NEWS   1

Definition at line 168 of file config.h.

Referenced by do_help().

#define EXIT_DELIMITER   ';'

Definition at line 120 of file config.h.

Referenced by do_decomp(), and matches_exit_from_list().

#define FILEDIR   "files/"

Definition at line 60 of file config.h.

#define HASH_FACTOR   16

Definition at line 73 of file config.h.

Referenced by helpindex_init(), init_btechstats(), init_chantab(), init_cmdtab(), init_flagtab(), init_functab(), init_logout_cmdtab(), init_mactab(), init_powertab(), initialize_partname_tables(), InitSpecialHash(), and main().

#define INDIR_TOKEN   '@'

Definition at line 110 of file config.h.

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

#define IS_TOKEN   '='

Definition at line 112 of file config.h.

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

#define LEAVE_REQUIRES_ENTERSUCC

Definition at line 164 of file config.h.

#define LISTPLACE_VAR   "#@"

Definition at line 130 of file config.h.

Referenced by bind_and_queue(), fun_iter(), fun_list(), and fun_parse().

#define LOOKUP_TOKEN   '*'

Definition at line 108 of file config.h.

Referenced by match_player(), and ok_name().

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

Definition at line 92 of file config.h.

#define MAX_ARG   100

Definition at line 70 of file config.h.

Referenced by process_cmdent().

#define MAX_GLOBAL_REGS   10

Definition at line 71 of file config.h.

Referenced by cf_init(), do_prog(), do_quitprog(), do_top(), do_ufun(), exec(), handle_prog(), main(), release_descriptor(), and setup_que().

#define NOT_TOKEN   '!'

Definition at line 105 of file config.h.

Referenced by do_set(), fun_set(), getboolexp1(), ok_name(), parse_boolexp_F(), and putbool_subexp().

#define NUM_ENV_VARS   10

Definition at line 69 of file config.h.

Referenced by dump_bqe(), load_bqe(), and setup_que().

#define NUMBER_TOKEN   '#'

Definition at line 109 of file config.h.

Referenced by absolute_name(), autodetect_list(), do_mail_stats(), fun_isdbref(), lookup_player(), ok_name(), and parse_range().

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

Definition at line 136 of file config.h.

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

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

Definition at line 133 of file config.h.

Referenced by check_dead_refs(), and create_obj().

#define OFLAGS1   (V_GDBM|V_ATRKEY)

Definition at line 94 of file config.h.

#define OFLAGS2   (V_ATRNAME|V_ATRMONEY)

Definition at line 96 of file config.h.

#define OR_TOKEN   '|'

Definition at line 107 of file config.h.

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

#define OUTPUT_BLOCK_SIZE   16384

Definition at line 76 of file config.h.

#define OUTPUT_FLAGS   (MANDFLAGS)

Definition at line 99 of file config.h.

Referenced by dump_database_internal().

#define OUTPUT_VERSION   1

Definition at line 98 of file config.h.

Referenced by dump_database_internal().

#define OWNER_TOKEN   '$'

Definition at line 113 of file config.h.

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

#define PLAYER_NAME_LIMIT   22

Definition at line 68 of file config.h.

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

#define PLUSHELP_COMMAND   "+help"

Definition at line 75 of file config.h.

#define random   rand

Definition at line 171 of file config.h.

Referenced by autoeject(), char_disembark(), char_eject(), char_rolld6(), do_kill(), fun_rand(), fun_scramble(), fun_shuffle(), getrandom(), HandleFasaVehicleCrit(), HandleVehicleCrit(), HandleVTOLCrit(), LoseWeapon(), MNumber(), move_object(), promote_match(), sane_qsort(), setup_que(), TFUNC_LOC(), TFUNC_LOC_RESEAL(), and TFUNC_LOC_VAL().

#define READ   read

Definition at line 141 of file config.h.

#define SIDE_EFFECT_FUNCTIONS

Definition at line 63 of file config.h.

#define srandom   srand

Definition at line 172 of file config.h.

Referenced by main().

#define StringCopy   strcpy

Definition at line 77 of file config.h.

Referenced by add_folder_name(), atr_add_raw(), atr_decode(), badname_add(), cf_init(), cf_read(), cf_set(), cf_string(), check_connect(), crypt_code(), dbrefs_to_names(), decode_flags(), destroy_obj(), do_decomp(), do_def_macro(), do_desc_macro(), do_doing(), do_examine(), do_kill(), do_macro(), do_mail_quick(), do_mail_read(), do_mail_review(), do_mail_stats(), do_malias_create(), do_malias_desc(), do_malias_rename(), do_motd(), do_page(), do_process_macro(), do_prog(), do_set(), do_sort_macro_set(), do_top(), do_ufun(), do_undef_macro(), dump_database_internal(), encrypt_logindata(), exec(), fun_case(), fun_elements(), fun_filter(), fun_fold(), fun_foreach(), fun_map(), fun_mix(), fun_munge(), fun_push(), fun_set(), fun_setq(), fun_setr(), fun_sort(), fun_sortby(), fun_squish(), fun_switch(), fun_vmag(), fun_vunit(), fwdlist_load(), get_folder_name(), get_mail_message(), get_obj_and_lock(), getboolexp1(), give_thing(), handle_ears(), handle_sets(), helpindex_read(), list_sites(), load_commac(), load_game(), load_macros(), look_exits(), mail_match(), mail_to_list(), make_namelist(), malias_read(), mmdb_db_read(), parse_arglist(), parse_attrib(), parse_attrib_wild(), parse_boolexp(), process_command(), replace_string_inplace(), restore_match_state(), save_match_state(), send_mail(), set_string(), setup_que(), sort_com_aliases(), status_chars(), status_string(), store_string(), strsave(), sweep_check(), tcache_add(), test_atr(), translate_string(), u_comp(), unparse_object(), unparse_object_numonly(), and whisper_pose().

#define StringCopyTrunc   strncpy

Definition at line 78 of file config.h.

Referenced by parse_msglist(), trimmed_name(), trimmed_site(), and wild1().

#define UNLOAD_OUTFLAGS   (MANDFLAGS)

Definition at line 102 of file config.h.

Referenced by dump_database_internal().

#define UNLOAD_VERSION   1

Definition at line 101 of file config.h.

Referenced by dump_database_internal().

#define WRITE   write

Definition at line 142 of file config.h.

Referenced by fcache_rawdump().

#define XFREE ( x,
y   )     (free((x)), (x) = NULL)

Definition at line 158 of file config.h.

Referenced by badname_remove(), db_free(), db_grow(), fwdlist_clr(), fwdlist_set(), olist_pop(), and set_string().

#define XMALLOC ( x,
y   )     (char *)malloc((x))

Definition at line 157 of file config.h.

Referenced by badname_add(), db_grow(), fwdlist_set(), olist_push(), set_string(), and strsave().


Typedef Documentation

typedef char boolexp_type

Definition at line 39 of file config.h.

typedef int dbref

Definition at line 36 of file config.h.

typedef int FLAG

Definition at line 37 of file config.h.

typedef char IBUF[16]

Definition at line 40 of file config.h.

typedef int POWER

Definition at line 38 of file config.h.


Function Documentation

int posix_memalign ( void **  memptr,
size_t  alignment,
size_t  size 
)

Referenced by bind_signals().

size_t strlcat ( char *  ,
const char *  ,
size_t   
)

Definition at line 250 of file compat.c.

00250                                                        {
00251     int iter = len - 1;
00252 
00253     if(len == 0) return strlen(src);
00254 
00255     while(iter && *dst) {
00256         iter--; dst++;
00257     }
00258 
00259     if(!iter)
00260         return len+strlen(src);
00261 
00262     while(iter--) {
00263         if((*dst++ = *src++) == 0)
00264             break;
00265     }
00266     if(iter < 1) *dst = 0;
00267 
00268     return (len - iter);
00269 }

size_t strlcpy ( char *  ,
const char *  ,
size_t   
)

Definition at line 236 of file compat.c.

Referenced by init_version().

00236                                                        {
00237     int iter = len - 1;
00238 
00239     if(len == 0) return strlen(src);
00240 
00241     while(iter--) {
00242         if((*dst++ = *src++) == 0)
00243             break;
00244     }
00245     if(iter < 1) *dst = 0;
00246     return (len - iter);
00247 }

char* strndup ( const char *  s,
size_t  n 
)

Definition at line 221 of file compat.c.

References strnlen().

Referenced by auto_get_command_arg(), auto_read_command_node(), first_parseattribute(), proper_explodearguments(), and proper_parseattributes().

00222 {
00223         int length;
00224         char *buf;
00225 
00226         length = strnlen(s, n);
00227         buf = malloc(length + 1);
00228         memset(buf, '\0', length + 1);
00229         strncpy(buf, s, length);
00230 
00231         return buf;
00232 }

size_t strnlen ( const char *  s,
size_t  maxlen 
)

Definition at line 205 of file compat.c.

Referenced by do_think(), process_cmdent(), process_command(), raw_broadcast(), and strndup().

00206 {
00207 
00208         int count;
00209 
00210         for(count = 0; count < maxlen && s[count] != '\x0'; count++);
00211 
00212         return count;
00213 
00214 }


Generated on Mon May 28 04:25:27 2007 for BattletechMUX by  doxygen 1.4.7