File utils.c


Included Files


External Variables

descriptor_list
extern struct descriptor_data* descriptor_list
Defined in: comm.c

time_info
extern struct time_data time_info
Defined in: db.c

world
extern struct room_data* world
Defined in: db.c

player_fl
extern FILE* player_fl
Defined in: db.c


Global Function CAP()

char* CAP ( char* txt )
Prototyped in: utils.h
Called by: House_list_guests()house.c
  create_money()handler.c
  diag_char_to_char()act.informative.c
  do_exits()act.informative.c
  do_gen_door()act.movement.c
  do_qcomm()act.comm.c
  do_report()act.other.c
  hcontrol_list_houses()house.c
  list_object()shop.c
  list_one_char()act.informative.c
  nanny()interpreter.c
  olc_bitvector()olc.c
  parse_object()db.c
  perform_act()comm.c
  perform_set()act.wizard.c
  spell_locate_object()spells.c

Global Function MAX()

int MAX ( int a, int b )
Prototyped in: utils.h
Called by: Crash_calculate_rent()objsave.c
  Crash_cryosave()objsave.c
  Crash_load()objsave.c
  Crash_report_rent()objsave.c
  advance_level()class.c
  affect_total()handler.c
  build_player_index()db.c
  close_socket()comm.c
  compute_armor_class()fight.c
  damage()fight.c
  do_ban()ban.c
  do_cast()spell_parser.c
  do_force()act.wizard.c
  do_purge()act.wizard.c
  do_quit()act.other.c
  do_start()class.c
  do_unban()ban.c
  do_wiznet()act.wizard.c
  do_wizutil()act.wizard.c
  do_zreset()act.wizard.c
  dump()spec_procs.c
  gain_condition()limits.c
  gain_exp()limits.c
  gain_exp_regardless()limits.c
  gen_receptionist()objsave.c
  group_gain()fight.c
  guild()spec_procs.c
  hcontrol_pay_house()house.c
  hit()fight.c
  interpret_espec()db.c
  isbanned()ban.c
  mag_manacost()spell_parser.c
  mag_savingthrow()magic.c
  nanny()interpreter.c
  perform_drop()act.item.c
  perform_dupe_check()interpreter.c
  perform_group_gain()fight.c
  perform_set()act.wizard.c
  show_string()modify.c
  solo_gain()fight.c
  spell_create_water()spells.c
  weather_change()weather.c

Global Function MIN()

int MIN ( int a, int b )
Prototyped in: utils.h
Called by: Crash_save()objsave.c
  advance_level()class.c
  affect_total()handler.c
  damage()fight.c
  do_cast()spell_parser.c
  do_drink()act.item.c
  do_steal()act.other.c
  dump()spec_procs.c
  gain_condition()limits.c
  gain_exp()limits.c
  get_max_players()comm.c
  group_gain()fight.c
  guild()spec_procs.c
  interpret_espec()db.c
  mag_points()magic.c
  perform_drop()act.item.c
  perform_group_gain()fight.c
  perform_set()act.wizard.c
  point_update()limits.c
  roll_real_abils()class.c
  shopping_sell()shop.c
  show_string()modify.c
  solo_gain()fight.c
  spell_summon()spells.c
  weather_change()weather.c

Global Function add_follower()

void add_follower ( struct char_data* ch, struct char_data* leader )
Prototyped in: utils.c
Calls: act()comm.c
  basic_mud_log()utils.c
  core_dump_real()utils.c
  abort(), calloc(), perror()
Called by: do_follow()act.movement.c
  mag_summons()magic.c
  pet_shops()spec_procs.c
  spell_charm()spells.c
References Variables: dummy_mobdb.c
  weather_infodb.c
  worlddb.c

Global Function age()

struct time_info_data* age ( struct char_data* ch )
Prototyped in: utils.h
Calls: mud_time_passed()utils.c
  time()
Called by: do_score()act.informative.c
  do_stat_character()act.wizard.c
  hit_gain()limits.c
  mana_gain()limits.c
  move_gain()limits.c
  spell_identify()spells.c

Global Function basic_mud_log()

void basic_mud_log ( const char* format, ... )
Prototyped in: utils.h
Calls: __builtin_next_arg(), asctime(), fflush(), fprintf(), localtime(), puts(), strlen(), time(), vfprintf()
Called by: ASSIGNMOB()spec_assign.c
  ASSIGNOBJ()spec_assign.c
  ASSIGNROOM()spec_assign.c
  Board_display_msg()boards.c
  Board_load_board()boards.c
  Board_remove_msg()boards.c
  Board_show_board()boards.c
  Board_write_message()boards.c
  Crash_clean_file()objsave.c
  Crash_delete_crashfile()objsave.c
  Crash_delete_file()objsave.c
  Crash_load()objsave.c
  Crash_report_rent()objsave.c
  Crash_report_unrentables()objsave.c
  House_boot()house.c
  House_delete_file()house.c
  Read_Invalid_List()ban.c
  act()comm.c
  add_follower()utils.c
  advance_level()class.c
  affect_modify()handler.c
  affect_to_char()handler.c
  assign_kings_castle()castle.c
  bfs_enqueue()graph.c
  boot_db()db.c
  boot_social_messages()act.social.c
  boot_the_shops()shop.c
  boot_world()db.c
  build_player_index()db.c
  cast_spell()spell_parser.c
  char_from_room()handler.c
  char_to_room()handler.c
  char_to_store()db.c
  check_object()db.c
  check_object_level()db.c
  check_object_spell_number()db.c
  check_start_rooms()db.c
  checkpointing()comm.c
  cityguard()spec_procs.c
  close_socket()comm.c
  core_dump_real()utils.c
  count_alias_records()db.c
  create_char()db.c
  create_entry()db.c
  create_money()handler.c
  create_obj()db.c
  dam_message()fight.c
  damage()fight.c
  diag_char_to_char()act.informative.c
  discrete_load()db.c
  do_advance()act.wizard.c
  do_alias()interpreter.c
  do_assist()act.offensive.c
  do_auto_exits()act.informative.c
  do_backstab()act.offensive.c
  do_ban()ban.c
  do_bash()act.offensive.c
  do_cast()spell_parser.c
  do_color()act.informative.c
  do_dc()act.wizard.c
  do_display()act.other.c
  do_drink()act.item.c
  do_eat()act.item.c
  do_echo()act.wizard.c
  do_equipment()act.informative.c
  do_exits()act.informative.c
  do_force()act.wizard.c
  do_gecho()act.wizard.c
  do_gen_comm()act.comm.c
  do_gen_ps()act.informative.c
  do_gen_tog()act.other.c
  do_get()act.item.c
  do_give()act.item.c
  do_goto()act.wizard.c
  do_gsay()act.comm.c
  do_hide()act.other.c
  do_invis()act.wizard.c
  do_kick()act.offensive.c
  do_look()act.informative.c
  do_olc()olc.c
  do_page()act.comm.c
  do_poofset()act.wizard.c
  do_purge()act.wizard.c
  do_put()act.item.c
  do_qcomm()act.comm.c
  do_quit()act.other.c
  do_remove()act.item.c
  do_reply()act.comm.c
  do_rescue()act.offensive.c
  do_restore()act.wizard.c
  do_say()act.comm.c
  do_score()act.informative.c
  do_send()act.wizard.c
  do_set()act.wizard.c
  do_show()act.wizard.c
  do_shutdown()act.wizard.c
  do_skillset()modify.c
  do_sneak()act.other.c
  do_spec_comm()act.comm.c
  do_start()class.c
  do_stat()act.wizard.c
  do_stat_character()act.wizard.c
  do_stat_object()act.wizard.c
  do_stat_room()act.wizard.c
  do_steal()act.other.c
  do_syslog()act.wizard.c
  do_toggle()act.informative.c
  do_track()graph.c
  do_unban()ban.c
  do_use()act.other.c
  do_users()act.informative.c
  do_wear()act.item.c
  do_who()act.informative.c
  do_wimpy()act.other.c
  do_wiznet()act.wizard.c
  do_wizutil()act.wizard.c
  do_write()act.comm.c
  do_zreset()act.wizard.c
  end_read_list()shop.c
  equip_char()handler.c
  evaluate_expression()shop.c
  extract_char_final()handler.c
  extract_obj()handler.c
  extract_pending_chars()handler.c
  file_to_string()db.c
  find_char_in_index()mail.c
  find_first_step()graph.c
  fread_action()act.social.c
  fread_string()db.c
  free_char()db.c
  gain_condition()limits.c
  gain_exp()limits.c
  gain_exp_regardless()limits.c
  game_loop()comm.c
  gen_board()boards.c
  gen_receptionist()objsave.c
  get_bind_addr()comm.c
  get_char_room_vis()handler.c
  get_char_world_vis()handler.c
  get_filename()utils.c
  get_from_container()act.item.c
  get_from_room()act.item.c
  get_hash_obj_vis()shop.c
  get_max_players()comm.c
  get_obj_in_list_vis()handler.c
  get_obj_vis()handler.c
  get_object_in_equip_vis()handler.c
  get_one_line()db.c
  get_player_vis()handler.c
  get_selling_obj()shop.c
  get_slide_obj_vis()shop.c
  guild()spec_procs.c
  hcontrol_destroy_house()house.c
  hcontrol_pay_house()house.c
  hit_gain()limits.c
  hupsig()comm.c
  index_boot()db.c
  index_mail()mail.c
  init_boards()boards.c
  init_char()db.c
  init_game()comm.c
  interpret_espec()db.c
  is_ok_char()shop.c
  is_tell_ok()act.comm.c
  level_exp()class.c
  list_char_to_char()act.informative.c
  list_obj_to_char()act.informative.c
  list_one_char()act.informative.c
  list_skills()spec_procs.c
  load_banned()ban.c
  load_messages()fight.c
  load_zones()db.c
  look_at_char()act.informative.c
  look_at_room()act.informative.c
  look_at_target()act.informative.c
  mag_creations()magic.c
  mag_objectmagic()spell_parser.c
  mag_unaffects()magic.c
  main()comm.c
  make_prompt()comm.c
  mana_gain()limits.c
  mobile_activity()mobact.c
  money_desc()handler.c
  move_gain()limits.c
  mudlog()utils.c
  name_from_drinkcon()act.item.c
  name_to_drinkcon()act.item.c
  nanny()interpreter.c
  new_descriptor()comm.c
  npc_steal()spec_procs.c
  number()utils.c
  obj_from_char()handler.c
  obj_from_obj()handler.c
  obj_from_room()handler.c
  obj_to_char()handler.c
  obj_to_obj()handler.c
  obj_to_room()handler.c
  ok_pick()act.movement.c
  olc_interpreter()olc.c
  one_argument()interpreter.c
  page_string()modify.c
  parse_enhanced_mob()db.c
  parse_mobile()db.c
  parse_object()db.c
  parse_room()db.c
  parse_simple_mob()db.c
  perform_act()comm.c
  perform_alias()interpreter.c
  perform_drop()act.item.c
  perform_dupe_check()interpreter.c
  perform_group()act.other.c
  perform_immort_invis()act.wizard.c
  perform_immort_vis()act.wizard.c
  perform_immort_where()act.informative.c
  perform_mortal_where()act.informative.c
  perform_remove()act.item.c
  perform_set()act.wizard.c
  perform_socket_read()comm.c
  perform_socket_write()comm.c
  perform_tell()act.comm.c
  pop()shop.c
  postmaster_send_mail()mail.c
  print_object_location()act.informative.c
  process_input()comm.c
  process_output()comm.c
  push_free_list()mail.c
  read_aliases()alias.c
  read_delete()mail.c
  read_from_file()mail.c
  read_line()shop.c
  read_mobile()db.c
  read_object()db.c
  read_shop_message()shop.c
  record_usage()comm.c
  remember()mobact.c
  reset_char()db.c
  reset_time()db.c
  sanity_check()comm.c
  saving_throws()class.c
  say_spell()spell_parser.c
  scan_file()mail.c
  setup_dir()db.c
  shopping_list()shop.c
  skill_message()fight.c
  sort_commands()act.informative.c
  spell_charm()spells.c
  spell_level()spell_parser.c
  spell_locate_object()spells.c
  spell_summon()spells.c
  store_mail()mail.c
  store_to_char()db.c
  str_cmp()utils.c
  str_dup()utils.c
  string_add()modify.c
  strn_cmp()utils.c
  thaco()class.c
  touch()utils.c
  unequip_char()handler.c
  weight_change_object()act.item.c
  write_aliases()alias.c
  write_to_descriptor()comm.c
  write_to_file()mail.c
  write_to_output()comm.c
  write_to_q()comm.c
  zone_update()db.c
References Variables: logfilecomm.c

Global Function circle_follow()

bool circle_follow ( struct char_data* ch, struct char_data* victim )
Prototyped in: utils.h
Called by: do_follow()act.movement.c
  spell_charm()spells.c

Global Function core_dump_real()

void core_dump_real ( const char* who, int line )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
Called by: add_follower()utils.c
  affect_remove()handler.c
  apply_ac()handler.c
  equip_char()handler.c
  point_update()limits.c
  set_fighting()fight.c
  stop_follower()utils.c
  store_mail()mail.c
  unequip_char()handler.c

Global Function dice()

int dice ( int number, int size )
Prototyped in: utils.h
Calls: circle_random()random.c
Called by: hit()fight.c
  mag_damage()magic.c
  mag_points()magic.c
  read_mobile()db.c
  reset_time()db.c
  skill_message()fight.c
  weather_change()weather.c

Global Function die_follower()

void die_follower ( struct char_data* ch )
Prototyped in: utils.c
Calls: stop_follower()utils.c
Called by: extract_char_final()handler.c

Global Function get_filename()

int get_filename ( char* orig_name, char* filename, int mode )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
  sprintf(), strcpy()
Called by: Crash_clean_file()objsave.c
  Crash_crashsave()objsave.c
  Crash_cryosave()objsave.c
  Crash_delete_crashfile()objsave.c
  Crash_delete_file()objsave.c
  Crash_idlesave()objsave.c
  Crash_listrent()objsave.c
  Crash_load()objsave.c
  Crash_rentsave()objsave.c
  read_aliases()alias.c
  write_aliases()alias.c

Global Function get_line()

int get_line ( FILE* fl, char* buf )
Prototyped in: utils.h
Calls: fgets(), strcpy(), strlen()
Called by: Read_Invalid_List()ban.c
  discrete_load()db.c
  load_zones()db.c
  parse_enhanced_mob()db.c
  parse_mobile()db.c
  parse_object()db.c
  parse_room()db.c
  parse_simple_mob()db.c
  read_line()shop.c
  setup_dir()db.c

Global Function log_death_trap()

void log_death_trap ( struct char_data* ch )
Prototyped in: utils.h
Calls: mudlog()utils.c
  sprintf()
Called by: do_simple_move()act.movement.c
References Variables: top_of_worlddb.c
  worlddb.c

Global Function mud_time_passed()

struct time_info_data* mud_time_passed ( time_t t2, time_t t1 )
Prototyped in: utils.c
Called by: age()utils.c
  reset_time()db.c

Global Function mudlog()

void mudlog ( const char* str, int type, int level, int file )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
  send_to_char()comm.c
  sprintf()
Called by: Crash_load()objsave.c
  auto_equip()objsave.c
  check_autowiz()limits.c
  check_idling()limits.c
  check_killer()fight.c
  close_socket()comm.c
  damage()fight.c
  do_ban()ban.c
  do_force()act.wizard.c
  do_gen_write()act.other.c
  do_purge()act.wizard.c
  do_quit()act.other.c
  do_skillset()modify.c
  do_start()class.c
  do_unban()ban.c
  do_wizutil()act.wizard.c
  do_zreset()act.wizard.c
  gain_exp()limits.c
  gain_exp_regardless()limits.c
  gen_receptionist()objsave.c
  hcontrol_pay_house()house.c
  log_death_trap()utils.c
  log_zone_error()db.c
  nanny()interpreter.c
  new_descriptor()comm.c
  perform_dupe_check()interpreter.c
  reread_wizlists()comm.c
  spell_summon()spells.c
  string_write()modify.c
  unrestrict_game()comm.c
  zone_update()db.c
References Variables: descriptor_listcomm.c
  dummy_mobdb.c

Global Function num_pc_in_room()

int num_pc_in_room ( struct room_data* room )
Prototyped in: utils.h
Called by: do_simple_move()act.movement.c

Global Function number()

int number ( int from, int to )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
  circle_random()random.c
Called by: advance_level()class.c
  create_money()handler.c
  do_backstab()act.offensive.c
  do_bash()act.offensive.c
  do_cast()spell_parser.c
  do_drink()act.item.c
  do_drop()act.item.c
  do_flee()act.offensive.c
  do_hide()act.other.c
  do_insult()act.social.c
  do_kick()act.offensive.c
  do_rescue()act.offensive.c
  do_sneak()act.other.c
  do_steal()act.other.c
  do_track()graph.c
  fry_victim()castle.c
  gen_receptionist()objsave.c
  get_victim()castle.c
  hit()fight.c
  init_char()db.c
  jerry()castle.c
  look_at_char()act.informative.c
  mag_materials()magic.c
  mag_savingthrow()magic.c
  mag_summons()magic.c
  magic_user()spec_procs.c
  mobile_activity()mobact.c
  npc_steal()spec_procs.c
  ok_pick()act.movement.c
  peter()castle.c
  puff()spec_procs.c
  read_mobile()db.c
  roll_real_abils()class.c
  snake()spec_procs.c
  spell_teleport()spells.c
  thief()spec_procs.c
  training_master()castle.c

Global Function prune_crlf()

void prune_crlf ( char* txt )
Prototyped in: utils.c
Calls: strlen()
Called by: boot_db()db.c
  do_reboot()db.c

Global Function real_time_passed()

struct time_info_data* real_time_passed ( time_t t2, time_t t1 )
Prototyped in: utils.c
Called by: do_score()act.informative.c

Global Function sprintbit()

void sprintbit ( bitvector_t bitvector, const char* names[], char* result )
Prototyped in: utils.h
Calls: strcat(), strcpy()
Called by: check_object()db.c
  do_stat_character()act.wizard.c
  do_stat_object()act.wizard.c
  do_stat_room()act.wizard.c
  list_detailed_shop()shop.c
  look_at_room()act.informative.c
  olc_bitvector()olc.c
  spell_identify()spells.c

Global Function sprinttype()

void sprinttype ( int type, const char* names[], char* result )
Prototyped in: utils.h
Calls: strcpy()
Called by: do_stat_character()act.wizard.c
  do_stat_object()act.wizard.c
  do_stat_room()act.wizard.c
  look_in_obj()act.informative.c
  spell_identify()spells.c

Global Function stop_follower()

void stop_follower ( struct char_data* ch )
Prototyped in: handler.h
Calls: act()comm.c
  affect_from_char()handler.c
  affected_by_spell()handler.c
  core_dump_real()utils.c
  free()
Called by: damage()fight.c
  die_follower()utils.c
  do_follow()act.movement.c
  do_ungroup()act.other.c
  spell_charm()spells.c

Global Function str_cmp()

int str_cmp ( const char* arg1, const char* arg2 )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
Called by: Valid_Name()ban.c
  check_object_spell_number()db.c
  do_alias()interpreter.c
  do_ban()ban.c
  do_display()act.other.c
  do_drop()act.item.c
  do_enter()act.movement.c
  do_force()act.wizard.c
  do_give()act.item.c
  do_group()act.other.c
  do_page()act.comm.c
  do_pour()act.item.c
  do_reboot()db.c
  do_set()act.wizard.c
  do_shutdown()act.wizard.c
  do_steal()act.other.c
  do_trans()act.wizard.c
  do_unban()ban.c
  do_users()act.informative.c
  do_who()act.informative.c
  evaluate_expression()shop.c
  find_name()interpreter.c
  get_char_room_vis()handler.c
  get_player_vis()handler.c
  hsort()db.c
  interpret_espec()db.c
  nanny()interpreter.c
  parse_mobile()db.c
  parse_object()db.c
  perform_set()act.wizard.c
  show_shops()shop.c

Global Function str_dup()

char* str_dup ( const char* source )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
  abort(), calloc(), perror(), strcpy(), strlen()
Called by: Board_write_message()boards.c
  Read_Invalid_List()ban.c
  create_money()handler.c
  do_alias()interpreter.c
  do_poofset()act.wizard.c
  file_to_string_alloc()db.c
  fread_action()act.social.c
  load_help()db.c
  load_zones()db.c
  mag_summons()magic.c
  make_corpse()fight.c
  olc_string()olc.c
  page_string()modify.c
  pet_shops()spec_procs.c
  postmaster_receive_mail()mail.c
  process_input()comm.c
  read_aliases()alias.c
  read_type_list()shop.c
  set_title()limits.c
  store_to_char()db.c
  write_to_q()comm.c

Global Function strn_cmp()

int strn_cmp ( const char* arg1, const char* arg2, int n )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
Called by: do_help()act.informative.c
  name_from_drinkcon()act.item.c
  read_type_list()shop.c

Global Function touch()

int touch ( const char* path )
Prototyped in: utils.h
Calls: basic_mud_log()utils.c
  __errno_location(), fclose(), fopen(), strerror()
Called by: build_player_index()db.c
  do_shutdown()act.wizard.c
  init_game()comm.c
  scan_file()mail.c