File mail.c

MUD MAIL SYSTEM MAIN FILE ***************************************
Written by Jeremy Elson (jelson@circlemud.org)


Included Files


Global Variable postmaster

int ( postmaster)(struct char_data* ch,void* me,int cmd,char* argument)
Visible in:  mail.c
   spec_assign.c
Used in: assign_mobiles()spec_assign.c

Global Variable mail_index

mail_index_type* mail_index
Visible in:  mail.c
Used in: find_char_in_index()mail.c
  index_mail()mail.c
  read_delete()mail.c

Global Variable free_list

position_list_type* free_list
Visible in:  mail.c
Used in: pop_free_list()mail.c
  push_free_list()mail.c

Global Variable file_end_pos

long file_end_pos
Visible in:  mail.c
Used in: pop_free_list()mail.c
  scan_file()mail.c
  write_to_file()mail.c

External Variables

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

mob_index
extern struct index_data* mob_index
Defined in: db.c

no_mail
extern int no_mail
Defined in: db.c


Global Function find_char_in_index()

mail_index_type* find_char_in_index ( long searchee )
Prototyped in: mail.c
Calls: basic_mud_log()utils.c
Called by: has_mail()mail.c
  index_mail()mail.c
  read_delete()mail.c
References Variables: mail_indexmail.c

Global Function has_mail()

int has_mail ( long recipient )
Prototyped in: mail.h
Calls: find_char_in_index()mail.c
Called by: nanny()interpreter.c
  postmaster_check_mail()mail.c
  postmaster_receive_mail()mail.c

Global Function index_mail()

void index_mail ( long id_to_index, long pos )
Prototyped in: mail.c
Calls: basic_mud_log()utils.c
  find_char_in_index()mail.c
  abort(), calloc(), perror()
Called by: scan_file()mail.c
  store_mail()mail.c
References Variables: mail_indexmail.c

Global Function pop_free_list()

long pop_free_list ( void )
Prototyped in: mail.c
Calls: free()
Called by: store_mail()mail.c
References Variables: file_end_posmail.c
  free_listmail.c

Global Function postmaster()

int ( postmaster) ( struct char_data* ch, void* me, int cmd, char* argument )
Calls: postmaster_check_mail()mail.c
  postmaster_receive_mail()mail.c
  postmaster_send_mail()mail.c
  send_to_char()comm.c
  strcmp()
References Variables: cmd_infointerpreter.c
  no_maildb.c

Global Function postmaster_check_mail()

void postmaster_check_mail ( struct char_data* ch, struct char_data* mailman, int cmd, char* arg )
Prototyped in: mail.c
Calls: act()comm.c
  has_mail()mail.c
  sprintf()
Called by: postmaster()mail.c

Global Function postmaster_receive_mail()

void postmaster_receive_mail ( struct char_data* ch, struct char_data* mailman, int cmd, char* arg )
Prototyped in: mail.c
Calls: act()comm.c
  create_obj()db.c
  has_mail()mail.c
  obj_to_char()handler.c
  read_delete()mail.c
  str_dup()utils.c
  sprintf()
Called by: postmaster()mail.c

Global Function postmaster_send_mail()

void postmaster_send_mail ( struct char_data* ch, struct char_data* mailman, int cmd, char* arg )
Prototyped in: mail.c
Calls: act()comm.c
  basic_mud_log()utils.c
  get_id_by_name()db.c
  one_argument()interpreter.c
  string_write()modify.c
  abort(), calloc(), perror(), sprintf()
Called by: postmaster()mail.c

Global Function push_free_list()

void push_free_list ( long pos )
Prototyped in: mail.c
Calls: basic_mud_log()utils.c
  abort(), calloc(), perror()
Called by: read_delete()mail.c
  scan_file()mail.c
References Variables: free_listmail.c

Global Function read_delete()

char* read_delete ( long recipient )
Prototyped in: mail.h
Calls: basic_mud_log()utils.c
  find_char_in_index()mail.c
  get_name_by_id()db.c
  push_free_list()mail.c
  read_from_file()mail.c
  write_to_file()mail.c
  abort(), asctime(), calloc(), free(), localtime(), perror(), realloc(), sprintf(), strcat(), strcpy(), strlen()
Called by: postmaster_receive_mail()mail.c
References Variables: mail_indexmail.c
  no_maildb.c

Global Function read_from_file()

void read_from_file ( void* buf, int size, long filepos )
Prototyped in: mail.c
Calls: basic_mud_log()utils.c
  fclose(), fopen(), fread(), fseek()
Called by: read_delete()mail.c
References Variables: no_maildb.c

Global Function scan_file()

int scan_file ( void )
Prototyped in: mail.h
Calls: basic_mud_log()utils.c
  index_mail()mail.c
  push_free_list()mail.c
  touch()utils.c
  fclose(), fopen(), fread(), ftell()
Called by: boot_db()db.c
References Variables: file_end_posmail.c

Global Function store_mail()

void store_mail ( long to, long from, char* message_pointer )
Prototyped in: mail.h
Calls: basic_mud_log()utils.c
  core_dump_real()utils.c
  index_mail()mail.c
  pop_free_list()mail.c
  write_to_file()mail.c
  memset(), strlen(), strncpy(), time()
Called by: string_add()modify.c

Global Function write_to_file()

void write_to_file ( void* buf, int size, long filepos )
Prototyped in: mail.c
Calls: basic_mud_log()utils.c
  fclose(), fopen(), fseek(), ftell(), fwrite()
Called by: read_delete()mail.c
  store_mail()mail.c
References Variables: file_end_posmail.c
  no_maildb.c