File lib.c


Included Files


Global Variable predict

int predict
Visible in:  ascii_to_ded.c
   assign.c
   bailout.c
   cmap.c
   common.c
   ded_to_ascii.c
   deddump.c
   delgame.c
   dip.c
   dipent.c
   diplog.c
   draw.c
   fmtwho.c
   global.c
   history.c
   jm.c
   lib.c

Global Variable signedon

int signedon
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: history()history.c
  process()dip.c

Global Variable i_am_really_master

int i_am_really_master
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable i_am_really_jk

int i_am_really_jk
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable starting

int starting
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable player

int player
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: process()dip.c
  process_conc()draw.c
  process_draw()draw.c

Global Variable listflg

int listflg
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broadcast

int broadcast
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: process_conc()draw.c
  process_draw()draw.c

Global Variable broadcast_master_only

int broadcast_master_only
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broad_part

int broad_part
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broadcast_absence_adjust

int broadcast_absence_adjust
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: deadline_recursive()lib.c
  process()dip.c

Global Variable broad_list

char broad_list[36+1]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broad_allbut

int broad_allbut
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broad_read

int broad_read
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broad_skip

int broad_skip
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broad_signon

int broad_signon
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable broad_params

int broad_params
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable read_phase

int read_phase
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable moreaddr

int moreaddr
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable create

int create
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable msg_header_done

int msg_header_done
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: history()history.c

Global Variable baddr

char baddr[80]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable raddr

char raddr[80]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable xaddr

char* xaddr
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable someone

char* someone
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable somepower

char* somepower
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable name

char name[20]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable master_press

int master_press
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable master_only_press

int master_only_press
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable ppress_read

int ppress_read
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable ppress_skip

int ppress_skip
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable ppress_done

int ppress_done
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable diary_read

int diary_read
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable diary_skip

int diary_skip
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable diary_done

int diary_done
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable Mfile

char Mfile[40]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: CheckRemindPlayer()dip.c

Global Variable Tfile

char Tfile[40]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: CheckRemindPlayer()dip.c

Global Variable mail_bfp

FILE* mail_bfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: process_conc()draw.c
  process_draw()draw.c

Global Variable mail_mbfp

FILE* mail_mbfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_mfp

FILE* mail_mfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: history()history.c

Global Variable mail_nfp

FILE* mail_nfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_ofp

FILE* mail_ofp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: CheckRemindPlayer()dip.c
  process()dip.c

Global Variable mail_qfp

FILE* mail_qfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_ifp

FILE* mail_ifp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_pfp

FILE* mail_pfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_tfp

FILE* mail_tfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c
Used in: CheckRemindPlayer()dip.c

Global Variable mail_ppfp

FILE* mail_ppfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable diaryfp

FILE* diaryfp
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_bfile

char mail_bfile[20]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_mbfile

char mail_mbfile[20]
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable mail_rfile

char* mail_rfile
Included from mail.h
Visible in:  dip.c
   draw.c
   history.c
   lib.c

Global Variable nowString

char nowString[20]
Visible in:  lib.c
Used in: NowString()lib.c

External Variables

rflg
extern char* rflg
Defined in: global.c

Local Variables

DIE_MAGIC
static long DIE_MAGIC
Used in: get_die_magic()

words
static char* words[]
Used in: get_coast()
  get_prov()

coasts
static int coasts[]
Used in: get_coast()
  get_prov()


Global Function AddCoastToOrder()

void AddCoastToOrder ( char* text, int c1 )
Prototyped in: functions.h
Calls: sprintf(), strcat()
References Variables: mtypeglobal.c

Global Function AddOrderToOrder()

void AddOrderToOrder ( char* text, int order )
Prototyped in: functions.h
Calls: strcat()

Global Function AddPlaceToOrder()

void AddPlaceToOrder ( char* text, int place )
Prototyped in: functions.h
Calls: strcat()
Called by: AddProvinceToOrder()lib.c
  AddUnitProvinceToOrder()lib.c
References Variables: prglobal.c

Global Function AddPowerToOrder()

void AddPowerToOrder ( char* text, int power )
Prototyped in: functions.h
Calls: strcat()
References Variables: powers

Global Function AddProvinceToOrder()

void AddProvinceToOrder ( char* text, int place )
Prototyped in: functions.h
Calls: AddPlaceToOrder()lib.c

Global Function AddUnitProvinceToOrder()

void AddUnitProvinceToOrder ( char* text, int unit, int place )
Prototyped in: functions.h
Calls: AddPlaceToOrder()lib.c
  AddUnitToOrder()lib.c

Global Function AddUnitToOrder()

void AddUnitToOrder ( char* text, int unit )
Prototyped in: functions.h
Calls: Utype()lib.c
  strcat()
Called by: AddUnitProvinceToOrder()lib.c

Global Function AllowedGatewayRetreat()

int AllowedGatewayRetreat ( int u, int p )
Prototyped in: functions.h
References Variables: dipentglobal.c
  gwglobal.c
  ngwglobal.c
  nunitglobal.c
  unitglobal.c

Global Function CheckForMultiUnitProvinces()

int CheckForMultiUnitProvinces ( void )
Prototyped in: functions.h
References Variables: nprglobal.c
  prglobal.c

Global Function FindPower()

int FindPower ( int power_index )
Prototyped in: functions.h
Called by: display_absence()lib.c
References Variables: dipentglobal.c

Global Function GetNativeIndex()

int GetNativeIndex ( void )
Prototyped in: functions.h
Called by: getdipent()dipent.c
  newdipent()dipent.c
References Variables: dipentglobal.c
  pletter

Global Function GetOneWord()

int GetOneWord ( char* text )
Prototyped in: functions.h

Global Function GetUnitIndex()

int GetUnitIndex ( int p, int power )
Prototyped in: functions.h
Calls: IsMultiProvince()lib.c
References Variables: nunitglobal.c
  prglobal.c
  unitglobal.c

Global Function HasUnit()

char HasUnit ( int province_index )
Prototyped in: functions.h
References Variables: prglobal.c
  unitglobal.c

Global Function InformCustodians()

void InformCustodians ( char* game_name, char* text, int variant, int is_gunboat )
Prototyped in: functions.h
Calls: MailOut()lib.c
  config()conf.c
  sprintf()
References Variables: linefmtwho.c
  variants

Global Function IsBlank()

int IsBlank ( char* text )

Global Function IsGatewayOrder()

int IsGatewayOrder ( int u, int* igw )
Prototyped in: functions.h
References Variables: dipentglobal.c
  gwglobal.c
  ngwglobal.c
  unitglobal.c

Global Function IsGatewayOrdered()

int IsGatewayOrdered ( int igw, int u, int result[] )
Prototyped in: functions.h
References Variables: dipentglobal.c
  gwglobal.c
  ngwglobal.c
  prglobal.c
  unitglobal.c

Global Function IsMultiProvince()

int IsMultiProvince ( int p )
Prototyped in: functions.h
Called by: GetUnitIndex()lib.c
References Variables: dipentglobal.c
  prglobal.c

Global Function MailOut()

void MailOut ( char* out_line, char* address )
Prototyped in: functions.h
Calls: GetAddressPart()lib.c
  config()conf.c
  execute()lib.c
  sprintf()
Called by: CheckRemindPlayer()dip.c
  InformCustodians()lib.c
  getdipent()dipent.c
  inform_party_of_blind_turn()dip.c
  master()dip.c
  process()dip.c
  process_conc()draw.c
  process_draw()draw.c
  putdipent()dipent.c

Global Function NowString()

char* NowString ( void )
Prototyped in: functions.h
Calls: ctime(), sprintf(), time()
Called by: process()dip.c
  process_conc()draw.c
  process_draw()draw.c
References Variables: nowStringlib.c

Global Function PermittedRailwayPower()

int PermittedRailwayPower ( int irw, char power_letter )
Prototyped in: functions.h
References Variables: dipentglobal.c
  rwglobal.c

Global Function Stype()

char* Stype ( char c )
Prototyped in: functions.h

Global Function Utype()

char* Utype ( char c )
Prototyped in: functions.h
Called by: AddUnitToOrder()lib.c

Global Function ValidGatewayProvince()

int ValidGatewayProvince ( int igw, int p )
Prototyped in: functions.h
References Variables: dipentglobal.c
  gwglobal.c

Global Function ValidRailwayProvince()

int ValidRailwayProvince ( int irw, int p, int* pr_index )
Prototyped in: functions.h
References Variables: dipentglobal.c
  rwglobal.c

Global Function absence_adjust()

int absence_adjust ( long* deadline )
Called by: deadline_recursive()lib.c
References Variables: dipentglobal.c

Global Function archive()

void archive ( char* file, char* subject )
Prototyped in: functions.h
Calls: config()conf.c
  real_bailout()bailout.c
  ctime(), fclose(), fgets(), fopen(), fprintf(), fputc(), fputs(), perror(), sprintf(), strncmp(), time()
Called by: process()dip.c
References Variables: dipentglobal.c
  linefmtwho.c
  log_fpglobal.c

Global Function astype()

char* astype ( char c, char cu )
Prototyped in: functions.h

Global Function autype()

char* autype ( char c )
Prototyped in: functions.h

Global Function bstype()

char* bstype ( char c )
Prototyped in: functions.h

Global Function deadline()

int deadline ( sequence* seq, int new )
Prototyped in: functions.h
Calls: deadline_recursive()lib.c
Called by: getdipent()dipent.c
  process()dip.c

Global Function deadline_recursive()

int deadline_recursive ( sequence* seq, int new, int* rec_count, void )
Prototyped in: lib.c
Calls: absence_adjust()lib.c
  deadline_recursive()lib.c
  fprintf(), localtime(), time()
Called by: deadline()lib.c
  deadline_recursive()lib.c
References Variables: broadcast_absence_adjustlib.c
  dipentglobal.c
  log_fpglobal.c

Global Function despace()

int despace ( char* intext )
Prototyped in: functions.h
Calls: strcpy(), strlen()

Global Function die()

int die ( int n, int s )
Prototyped in: functions.h
Calls: rand()

Global Function die_rolls()

void die_rolls ( int seed )
Prototyped in: functions.h
Calls: get_die_magic()lib.c
  srand()
References Variables: dipentglobal.c
  rflgglobal.c

Global Function display_absence()

void display_absence ( int pnum, FILE* fptr )
Prototyped in: functions.h
Calls: FindPower()lib.c
  display_one_absences()lib.c

Global Function display_one_absences()

void display_one_absences ( int pindex, FILE* fptr )
Calls: ptime()jm.c
  fprintf()
Called by: display_absence()lib.c
References Variables: dipentglobal.c
  rfpglobal.c
  powers

Global Function execute()

int execute ( char* command )
Prototyped in: functions.h
Calls: real_bailout()bailout.c
  ctime(), fclose(), fopen(), fprintf(), perror(), sleep(), system(), time()
Called by: MailOut()lib.c
  master()dip.c
References Variables: log_fpglobal.c

Global Function ferrck()

void ferrck ( FILE* fp, int n )
Prototyped in: functions.h
Calls: real_bailout()bailout.c
  fprintf()
Called by: master()dip.c
References Variables: log_fpglobal.c

Global Function get_coast()

char* get_coast ( char* coast_string, int* coast )
Prototyped in: functions.h
Calls: lookfor()lib.c
References Variables: coastslib.c
  wordslib.c

Global Function get_die_magic()

long get_die_magic ( void )
Calls: real_bailout()bailout.c
  fclose(), fopen(), fprintf(), fscanf(), rand()
Called by: die_rolls()lib.c
References Variables: DIE_MAGIClib.c
  log_fpglobal.c

Global Function get_prov()

char* get_prov ( char* search_province, int* province_number, int* coast )
Prototyped in: porder.h
Calls: lookfor()lib.c
  strchr(), toupper()
Called by: main()cmap.c
References Variables: coastslib.c
  dipentglobal.c
  heapglobal.c
  prglobal.c
  wordslib.c

Global Function lookfor()

char* lookfor ( char* l, char* w[], int len, int* n )
Prototyped in: porder.h
Calls: lookforv()lib.c
Called by: get_coast()lib.c
  get_prov()lib.c
  getseq()dipent.c
  history()history.c

Global Function lookforv()

char* lookforv ( char* l, char* w[], int len, int* n, int exact_word )
Prototyped in: functions.h
Calls: strchr(), tolower()
Called by: lookfor()lib.c

Global Function mov_type()

char* mov_type ( int prov_index, int unit_index )
Prototyped in: functions.h
Calls: strcat(), strcpy()
References Variables: prglobal.c
  unitglobal.c

Global Function power()

int power ( char c )
Prototyped in: functions.h
Calls: toupper()
Called by: chkconc()draw.c
  chkdraw()draw.c
  getplay()dipent.c
  process_draw()draw.c
  testdipent()dipent.c
References Variables: dipentglobal.c

Global Function strcap()

char* strcap ( char* string )
Prototyped in: functions.h
Calls: malloc(), strlen()

Global Function utype()

char* utype ( char c )
Prototyped in: functions.h

Global Function wrap()

void wrap ( FILE* fp, char* buf, int pos, int indent )
Prototyped in: functions.h
Calls: fprintf(), fputs()

Global Function wrap_char()

void wrap_char ( FILE* fp, char* buf, int pos, int indent, char w_char )
Prototyped in: functions.h
Calls: fprintf(), fputs()

Local Function GetAddressPart()

static char* GetAddressPart ( int index, char* address )
Calls: strchr(), strcpy(), strlen()
Called by: MailOut()lib.c