/*
 * Our function prototypes.
 * One big lump ... this is every function in Merc.
 */
#define CD	CHAR_DATA
#define MID	MOB_INDEX_DATA
#define OD	OBJ_DATA
#define OID	OBJ_INDEX_DATA
#define RID	ROOM_INDEX_DATA
#define SF	SPEC_FUN
#define AD	AFFECT_DATA
#define MPC	MPROG_CODE

/* act_comm.c */
void check_sex args ( ( CHAR_DATA * ch ) );
void add_follower args ( ( CHAR_DATA * ch, CHAR_DATA * master ) );
void stop_follower args ( ( CHAR_DATA * ch ) );
void nuke_pets args ( ( CHAR_DATA * ch ) );
void die_follower args ( ( CHAR_DATA * ch ) );
bool is_same_group args ( ( CHAR_DATA * ach, CHAR_DATA * bch ) );
int colour_lookup args ( ( const char *arg ) );
int cslot_lookup args ( ( const char *arg ) );
char *char_colour args ( ( CHAR_DATA * ch, int slot ) );
void default_colour args ( ( CHAR_DATA * ch, int slot ) );
int strlen_color args ( ( const char *string ) );
bool check_cstring args ( ( char *string ) );
char *random_colour args ( ( void ) );
char *random_background args ( ( void ) );
void smash_colour args ( ( char *buffer, char *str ) );
void stringf
args ( ( char *buffer, int length, int align, char *fill, char *string ) );
void tilde_to_color args ( ( char *buffer, char *str ) );
void color_to_tilde args ( ( char *buffer, char *str ) );
void show_greeting args ( ( DESCRIPTOR_DATA * dnew ) );
bool process_ansi_output args ( ( DESCRIPTOR_DATA * d ) );
char *color_default args ( ( CHAR_DATA * ch ) );

/* act_enter.c */
RID *get_random_room args ( ( CHAR_DATA * ch ) );

/* act_info.c */
void set_title args ( ( CHAR_DATA * ch, char *title ) );
char *format_who args ( ( CHAR_DATA * ch, CHAR_DATA * wch ) );

/* act_move.c */
void move_char args ( ( CHAR_DATA * ch, int door, bool follow ) );

/* act_obj.c */
bool can_loot args ( ( CHAR_DATA * ch, OBJ_DATA * obj ) );
void wear_obj args ( ( CHAR_DATA * ch, OBJ_DATA * obj, bool fReplace ) );
void get_obj
args ( ( CHAR_DATA * ch, OBJ_DATA * obj, OBJ_DATA * container ) );
void recursive_clone
args ( ( CHAR_DATA * ch, OBJ_DATA * obj, OBJ_DATA * clone ) );
bool obj_check args ( ( CHAR_DATA * ch, OBJ_DATA * obj ) );

/* act_wiz.c */
void wiznet
args ( ( char *string, CHAR_DATA * ch, OBJ_DATA * obj, FLAG flag,
         FLAG flag_skip, int min_level ) );
void copyover_recover args ( ( void ) );

/* alias.c */
void substitute_alias args ( ( DESCRIPTOR_DATA * d, char *input ) );

/* ban.c */
bool check_ban args ( ( char *site, int type ) );
void save_bans args ( ( void ) );
void load_bans args ( ( void ) );
void ban_site args ( ( CHAR_DATA * ch, char *argument, bool fPerm ) );

/* comm.c */
void show_string args ( ( struct descriptor_data * d, char *input ) );
void close_socket args ( ( DESCRIPTOR_DATA * dclose ) );
void write_to_buffer
args ( ( DESCRIPTOR_DATA * d, const char *txt, int length ) );
void chsend args ( ( const char *txt, CHAR_DATA * ch ) );
void page_to_char args ( ( const char *txt, CHAR_DATA * ch ) );
void act
args ( ( const char *format, CHAR_DATA * ch, const void *arg1,
         const void *arg2, int type ) );
void act_new
args ( ( const char *format, CHAR_DATA * ch, const void *arg1,
         const void *arg2, int type, int min_pos ) );
void chprintf args ( ( CHAR_DATA *, char *, ... ) )
    __attribute__ ( ( format ( printf, 2, 3 ) ) );
void bugf args ( ( char *, ... ) )
    __attribute__ ( ( format ( printf, 1, 2 ) ) );
void fix_sex args ( ( CHAR_DATA * ch ) );
void logf args ( ( char *fmt, ... ) )
    __attribute__ ( ( format ( printf, 1, 2 ) ) );
void vinterpret args ( ( CHAR_DATA * ch, char *argument, ... ) )
    __attribute__ ( ( format ( printf, 2, 3 ) ) );
int strswitch args ( ( const char *arg, ... ) )
    __attribute__ ( ( format ( printf, 1, 2 ) ) );

/* db.c */
void reset_area args ( ( AREA_DATA * pArea ) ); /* OLC */
void reset_room args ( ( ROOM_INDEX_DATA * pRoom ) );   /* OLC */
char *print_flags args ( ( FLAG flag ) );
void boot_db args ( ( void ) );
void area_update args ( ( void ) );
CD *create_mobile args ( ( MOB_INDEX_DATA * pMobIndex ) );
void clone_mobile args ( ( CHAR_DATA * parent, CHAR_DATA * clone ) );
OD *create_object args ( ( OBJ_INDEX_DATA * pObjIndex, int level ) );
void clone_object args ( ( OBJ_DATA * parent, OBJ_DATA * clone ) );
void clear_char args ( ( CHAR_DATA * ch ) );
char *get_extra_descr args ( ( const char *name, EXTRA_DESCR_DATA * ed ) );
MID *get_mob_index args ( ( VNUM vnum ) );
OID *get_obj_index args ( ( VNUM vnum ) );
RID *get_room_index args ( ( VNUM vnum ) );
MPC *get_mprog_index args ( ( VNUM vnum ) );
char fread_letter args ( ( FILE * fp ) );
int fread_number args ( ( FILE * fp ) );
FLAG fread_flag args ( ( FILE * fp ) );
char *fread_string args ( ( FILE * fp ) );
char *fread_string_eol args ( ( FILE * fp ) );
void fread_to_eol args ( ( FILE * fp ) );
char *fread_word args ( ( FILE * fp ) );
FLAG flag_convert args ( ( char letter ) );
void *alloc_mem args ( ( size_t sMem ) );
void *alloc_perm args ( ( int sMem ) );
void free_mem args ( ( void *wMem, size_t sMem ) );
char *str_dup args ( ( const char *str ) );
void free_string args ( ( char *pstr ) );
int number_fuzzy args ( ( int number ) );
int number_range args ( ( int from, int to ) );
int number_percent args ( ( void ) );
int number_door args ( ( void ) );
int number_bits args ( ( int width ) );
long number_mm args ( ( void ) );
int dice args ( ( int number, int size ) );
int interpolate args ( ( int level, int value_00, int value_32 ) );
void smash_tilde args ( ( char *str ) );
bool str_cmp args ( ( const char *astr, const char *bstr ) );
bool str_prefix args ( ( const char *astr, const char *bstr ) );
bool str_infix args ( ( const char *astr, const char *bstr ) );
bool str_suffix args ( ( const char *astr, const char *bstr ) );
char *capitalize args ( ( const char *str ) );
void append_file args ( ( CHAR_DATA * ch, char *file, char *str ) );
void bug args ( ( const char *str, int param ) );
void log_string args ( ( const char *str ) );
void tail_chain args ( ( void ) );
void new_reset args ( ( ROOM_INDEX_DATA * pR, RESET_DATA * pReset ) );

/* db2.c */
#if defined(CONST_SOCIAL)
void load_socials args ( ( FILE * fp ) );
#endif
void load_mobiles args ( ( FILE * fp ) );
void load_objects args ( ( FILE * fp ) );
FILE *file_open args ( ( char *file, const char *mode ) );
bool file_close args ( ( FILE * fp ) );

/* effect.c */
void acid_effect args ( ( void *vo, int level, int dam, int target ) );
void cold_effect args ( ( void *vo, int level, int dam, int target ) );
void fire_effect args ( ( void *vo, int level, int dam, int target ) );
void poison_effect args ( ( void *vo, int level, int dam, int target ) );
void shock_effect args ( ( void *vo, int level, int dam, int target ) );

/* fight.c */
bool is_safe args ( ( CHAR_DATA * ch, CHAR_DATA * victim ) );
bool is_safe_spell args ( ( CHAR_DATA * ch, CHAR_DATA * victim, bool area ) );
void violence_update args ( ( void ) );
void multi_hit args ( ( CHAR_DATA * ch, CHAR_DATA * victim, int dt ) );
bool damage
args ( ( CHAR_DATA * ch, CHAR_DATA * victim, int dam, int dt, int Class,
         bool show ) );
bool damage_old
args ( ( CHAR_DATA * ch, CHAR_DATA * victim, int dam, int dt, int Class,
         bool show ) );
void update_pos args ( ( CHAR_DATA * victim ) );
void stop_fighting args ( ( CHAR_DATA * ch, bool fBoth ) );
void check_killer args ( ( CHAR_DATA * ch, CHAR_DATA * victim ) );

/* handler.c */
AD *affect_find args ( ( AFFECT_DATA * paf, int sn ) );
void affect_check args ( ( CHAR_DATA * ch, int where, FLAG vector ) );
int count_users args ( ( OBJ_DATA * obj ) );
void deduct_cost args ( ( CHAR_DATA * ch, int cost ) );
void affect_enchant args ( ( OBJ_DATA * obj ) );
int check_immune args ( ( CHAR_DATA * ch, int dam_type ) );
int material_lookup args ( ( const char *name ) );
int weapon_lookup args ( ( const char *name ) );
int weapon_typ args ( ( const char *name ) );
char *weapon_name args ( ( int weapon_Type ) );
char *item_name args ( ( int pitem_type ) );
int attack_lookup args ( ( const char *name ) );
FLAG wiznet_lookup args ( ( const char *name ) );
int class_lookup args ( ( const char *name ) );
bool is_clan args ( ( CHAR_DATA * ch ) );
bool is_same_clan args ( ( CHAR_DATA * ch, CHAR_DATA * victim ) );
bool is_old_mob args ( ( CHAR_DATA * ch ) );
int get_skill args ( ( CHAR_DATA * ch, int sn ) );
int get_weapon_sn args ( ( CHAR_DATA * ch ) );
int get_weapon_skill args ( ( CHAR_DATA * ch, int sn ) );
int get_age args ( ( CHAR_DATA * ch ) );
void reset_char args ( ( CHAR_DATA * ch ) );
int get_trust args ( ( CHAR_DATA * ch ) );
int get_curr_stat args ( ( CHAR_DATA * ch, int stat ) );
int get_max_train args ( ( CHAR_DATA * ch, int stat ) );
int can_carry_n args ( ( CHAR_DATA * ch ) );
int can_carry_w args ( ( CHAR_DATA * ch ) );
bool is_name args ( ( char *str, char *namelist ) );
bool is_exact_name args ( ( char *str, char *namelist ) );
void affect_to_char args ( ( CHAR_DATA * ch, AFFECT_DATA * paf ) );
void affect_to_obj args ( ( OBJ_DATA * obj, AFFECT_DATA * paf ) );
void affect_remove args ( ( CHAR_DATA * ch, AFFECT_DATA * paf ) );
void affect_remove_obj args ( ( OBJ_DATA * obj, AFFECT_DATA * paf ) );
void affect_strip args ( ( CHAR_DATA * ch, int sn ) );
bool is_affected args ( ( CHAR_DATA * ch, int sn ) );
void affect_join args ( ( CHAR_DATA * ch, AFFECT_DATA * paf ) );
void char_from_room args ( ( CHAR_DATA * ch ) );
void char_to_room args ( ( CHAR_DATA * ch, ROOM_INDEX_DATA * pRoomIndex ) );
void obj_to_char args ( ( OBJ_DATA * obj, CHAR_DATA * ch ) );
void obj_from_char args ( ( OBJ_DATA * obj ) );
int apply_ac args ( ( OBJ_DATA * obj, int iWear, int type ) );
OD *get_eq_char args ( ( CHAR_DATA * ch, int iWear ) );
void equip_char args ( ( CHAR_DATA * ch, OBJ_DATA * obj, int iWear ) );
void unequip_char args ( ( CHAR_DATA * ch, OBJ_DATA * obj ) );
int count_obj_list args ( ( OBJ_INDEX_DATA * obj, OBJ_DATA * list ) );
void obj_from_room args ( ( OBJ_DATA * obj ) );
void obj_to_room args ( ( OBJ_DATA * obj, ROOM_INDEX_DATA * pRoomIndex ) );
void obj_to_obj args ( ( OBJ_DATA * obj, OBJ_DATA * obj_to ) );
void obj_from_obj args ( ( OBJ_DATA * obj ) );
void extract_obj args ( ( OBJ_DATA * obj ) );
void extract_char args ( ( CHAR_DATA * ch, bool fPull ) );
CD *get_char_room args ( ( CHAR_DATA * ch, char *argument ) );
CD *get_char_world args ( ( CHAR_DATA * ch, char *argument ) );
OD *get_obj_type args ( ( OBJ_INDEX_DATA * pObjIndexData ) );
OD *get_obj_list args ( ( CHAR_DATA * ch, char *argument, OBJ_DATA * list ) );
OD *get_obj_carry
args ( ( CHAR_DATA * ch, char *argument, CHAR_DATA * viewer ) );
OD *get_obj_wear args ( ( CHAR_DATA * ch, char *argument ) );
OD *get_obj_here args ( ( CHAR_DATA * ch, char *argument ) );
OD *get_obj_world args ( ( CHAR_DATA * ch, char *argument ) );
OD *create_money args ( ( int gold, int silver ) );
int get_obj_number args ( ( OBJ_DATA * obj ) );
int get_obj_weight args ( ( OBJ_DATA * obj ) );
int get_true_weight args ( ( OBJ_DATA * obj ) );
bool room_is_dark args ( ( ROOM_INDEX_DATA * pRoomIndex ) );
bool is_room_owner args ( ( CHAR_DATA * ch, ROOM_INDEX_DATA * room ) );
bool room_is_private args ( ( ROOM_INDEX_DATA * pRoomIndex ) );
bool can_see args ( ( CHAR_DATA * ch, CHAR_DATA * victim ) );
bool can_see_obj args ( ( CHAR_DATA * ch, OBJ_DATA * obj ) );
bool can_see_room args ( ( CHAR_DATA * ch, ROOM_INDEX_DATA * pRoomIndex ) );
bool can_drop_obj args ( ( CHAR_DATA * ch, OBJ_DATA * obj ) );
bool is_friend args ( ( CHAR_DATA * ch, CHAR_DATA * victim ) );
bool is_full_name args ( ( const char *str, char *namelist ) );

/* hedit.c */
HELP_AREA *get_help_area args ( ( HELP_DATA * help ) );

/* interp.c */
void interpret args ( ( CHAR_DATA * ch, char *argument ) );
bool is_number args ( ( char *arg ) );
int number_argument args ( ( char *argument, char *arg ) );
int mult_argument args ( ( char *argument, char *arg ) );
char *one_argument args ( ( char *argument, char *arg_first ) );
void load_disabled args ( ( void ) );
void save_disabled args ( ( void ) );

/* magic.c */
int find_spell args ( ( CHAR_DATA * ch, const char *name ) );
int mana_cost ( CHAR_DATA * ch, int min_mana, int level );
int skill_lookup args ( ( const char *name ) );
int slot_lookup args ( ( int slot ) );
bool saves_spell args ( ( int level, CHAR_DATA * victim, int dam_type ) );
void obj_cast_spell
args ( ( int sn, int level, CHAR_DATA * ch, CHAR_DATA * victim,
         OBJ_DATA * obj ) );
bool check_dispel args ( ( int dis_level, CHAR_DATA * victim, int sn ) );
bool saves_dispel args ( ( int dis_level, int spell_level, int duration ) );

/* mob_prog.c */
void program_flow
args ( ( VNUM vnum, char *source, CHAR_DATA * mob, CHAR_DATA * ch,
         const void *arg1, const void *arg2 ) );
void mp_act_trigger
args ( ( char *argument, CHAR_DATA * mob, CHAR_DATA * ch, const void *arg1,
         const void *arg2, int type ) );
bool mp_percent_trigger
args ( ( CHAR_DATA * mob, CHAR_DATA * ch, const void *arg1, const void *arg2,
         int type ) );
void mp_bribe_trigger
args ( ( CHAR_DATA * mob, CHAR_DATA * ch, int amount ) );
bool mp_exit_trigger args ( ( CHAR_DATA * ch, int dir ) );
void mp_give_trigger
args ( ( CHAR_DATA * mob, CHAR_DATA * ch, OBJ_DATA * obj ) );
void mp_greet_trigger args ( ( CHAR_DATA * ch ) );
void mp_hprct_trigger args ( ( CHAR_DATA * mob, CHAR_DATA * ch ) );

/* mob_cmds.c */
void mob_interpret args ( ( CHAR_DATA * ch, char *argument ) );

/* save.c */
void save_char_obj args ( ( CHAR_DATA * ch ) );
bool load_char_obj args ( ( DESCRIPTOR_DATA * d, char *name ) );

/* skills.c */
bool parse_gen_groups args ( ( CHAR_DATA * ch, char *argument ) );
void list_group_costs args ( ( CHAR_DATA * ch ) );
void list_group_known args ( ( CHAR_DATA * ch ) );
int exp_per_level args ( ( CHAR_DATA * ch, int points ) );
void check_improve
args ( ( CHAR_DATA * ch, int sn, bool success, int multiplier ) );
int group_lookup args ( ( const char *name ) );
void gn_add args ( ( CHAR_DATA * ch, int gn ) );
void gn_remove args ( ( CHAR_DATA * ch, int gn ) );
void group_add args ( ( CHAR_DATA * ch, const char *name, bool deduct ) );
void group_remove args ( ( CHAR_DATA * ch, const char *name ) );

/* special.c */
SF *spec_lookup args ( ( const char *name ) );
char *spec_name args ( ( SPEC_FUN * function ) );

/* statlist.c */
void update_statlist args ( ( CHAR_DATA * ch, bool pdelete ) );
void load_statlist args ( ( void ) );
void save_statlist args ( ( void ) );
void show_game_stats args ( ( CHAR_DATA * ch, int type ) );

/* teleport.c */
RID *room_by_name args ( ( char *target, int level, bool error ) );

/* update.c */
void advance_level args ( ( CHAR_DATA * ch, bool hide ) );
void gain_exp args ( ( CHAR_DATA * ch, int gain ) );
void gain_condition args ( ( CHAR_DATA * ch, int iCond, int value ) );
void update_handler args ( ( void ) );

/* social-edit.c */
void load_social_table (  );
void save_social_table (  );

/* string.c */
void string_edit args ( ( CHAR_DATA * ch, char **pString ) );
void string_append args ( ( CHAR_DATA * ch, char **pString ) );
char *string_replace args ( ( char *orig, char *old, char *pnew ) );
void string_add args ( ( CHAR_DATA * ch, char *argument ) );
char *format_string args ( ( char *oldstring /*, bool fSpace */  ) );
char *first_arg args ( ( char *argument, char *arg_first, bool fCase ) );
char *string_unpad args ( ( char *argument ) );
char *string_proper args ( ( char *argument ) );

/* olc.c */
bool run_olc_editor args ( ( DESCRIPTOR_DATA * d ) );
char *olc_ed_name args ( ( CHAR_DATA * ch ) );
char *olc_ed_vnum args ( ( CHAR_DATA * ch ) );
void clean_area_links args ( ( AREA_DATA * target ) );
bool vnum_OK args ( ( VNUM lnum, VNUM hnum ) );

/* lookup.c */
int race_lookup args ( ( const char *name ) );
int item_lookup args ( ( const char *name ) );
int liq_lookup args ( ( const char *name ) );

#undef	CD
#undef	MID
#undef	OD
#undef	OID
#undef	RID
#undef	SF
#undef AD