File src/topten.c


Included Files


Preprocessor definitions

#define done_stopprint

#define newttentry

#define dealloc_ttentry( ttent )

#define NAMSZ 10

#define DTHSZ 60

#define ROLESZ 3

#define PERSMAX 3

#define POINTSMIN 1

#define ENTRYMAX 100

#define PERS_IS_UID

#define TTFIELDS 13

#define HUP


Type struct toptenentry

struct toptenentry
struct toptenentry 
   { 
     struct toptenentry* tt_next; 
     long points; 
     int deathdnum; 
     int deathlev; 
     int maxlvl; 
     int hp; 
     int maxhp; 
     int deaths; 
     int ver_major; 
     int ver_minor; 
     int patchlevel; 
     long deathdate; 
     long birthdate; 
     int uid; 
     char plrole[3+1]; 
     char plrace[3+1]; 
     char plgend[3+1]; 
     char plalign[3+1]; 
     char name[10+1]; 
     char death[60+1]; 
   } 

Global Variable tt_head

struct toptenentry* tt_head
Visible in:  src/topten.c
Used in: prscore()src/topten.c
  topten()src/topten.c

Global Variable killed_by_prefix

const char* killed_by_prefix[]
Visible in:  src/end.c
   src/rip.c
   src/topten.c
Used in: done()src/end.c
  genl_outrip()src/rip.c
  topten()src/topten.c

Local Variables

toptenwin
static winid toptenwin
Used in: topten()
  topten_print()
  topten_print_bold()

Global Function prscore()

void prscore ( int argc, char** argv )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  dlb_cleanup()src/dlb.c
  dlb_init()src/dlb.c
  fopen_datafile()src/files.c
  free_dungeons()src/save.c
  free_ttlist()src/topten.c
  init_dungeons()src/dungeon.c
  outentry()src/topten.c
  outheader()src/topten.c
  raw_printf()src/pline.c
  readentry()src/topten.c
  score_wanted()src/topten.c
  fclose(), getuid(), sprintf(), strcat(), strcmp(), strncmp()
References Variables: dungeon_topologysrc/decl.c
  hnamesrc/decl.c
  tt_headsrc/topten.c
  windowprocs

Global Function topten()

void topten ( int how )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  an()src/objnam.c
  deepest_lev_reached()src/dungeon.c
  fopen_datafile()src/files.c
  free_ttlist()src/topten.c
  impossible()src/pline.c
  lock_file()src/files.c
  observable_depth()src/topten.c
  ordin()src/hacklib.c
  outentry()src/topten.c
  outheader()src/topten.c
  readentry()src/topten.c
  topten_print()src/topten.c
  unlock_file()src/files.c
  writeentry()src/topten.c
  yyyymmdd()src/hacklib.c
  fclose(), free(), getuid(), sprintf(), strcat(), strlen(), strncat(), strncmp(), strncpy()
Called by: done()src/end.c
References Variables: alignssrc/role.c
  flagssrc/decl.c
  genderssrc/role.c
  killed_by_prefixsrc/topten.c
  killersrc/decl.c
  killer_formatsrc/decl.c
  plnamesrc/decl.c
  program_statesrc/decl.c
  toptenwinsrc/topten.c
  tt_headsrc/topten.c
  usrc/decl.c
  uracesrc/role.c
  urolesrc/role.c
  windowprocs

Global Function tt_oname()

struct obj* tt_oname ( struct obj* otmp )
Prototyped in: include/extern.h
Calls: classmon()src/topten.c
  fopen_datafile()src/files.c
  impossible()src/pline.c
  obj_stop_timers()src/timeout.c
  oname()src/do_name.c
  readentry()src/topten.c
  rnd()src/rnd.c
  start_corpse_timeout()src/mkobj.c
  weight()src/mkobj.c
  fclose(), rewind()
Called by: mk_tt_object()src/mkobj.c

Local Function classmon()

static int classmon ( char* plch, boolean fem )
Prototyped in: src/topten.c
Calls: impossible()src/pline.c
  strcmp(), strncmp()
Called by: tt_oname()src/topten.c
References Variables: rolessrc/role.c

Local Function free_ttlist()

static void free_ttlist ( struct toptenentry* tt )
Prototyped in: src/topten.c
Calls: free()
Called by: prscore()src/topten.c
  topten()src/topten.c

Local Function observable_depth()

static xchar observable_depth ( d_level* lev )
Prototyped in: src/topten.c
Calls: depth()src/dungeon.c
Called by: topten()src/topten.c

Local Function outentry()

static void outentry ( int rank, struct toptenentry* t1, boolean so )
Prototyped in: src/topten.c
Calls: eos()src/hacklib.c
  highc()src/hacklib.c
  topten_print()src/topten.c
  topten_print_bold()src/topten.c
  sprintf(), strcat(), strchr(), strcpy(), strlen(), strncmp()
Called by: prscore()src/topten.c
  topten()src/topten.c
References Variables: dungeon_topologysrc/decl.c
  dungeonssrc/decl.c

Local Function outheader()

static void outheader ( void )
Prototyped in: src/topten.c
Calls: eos()src/hacklib.c
  topten_print()src/topten.c
  strcpy()
Called by: prscore()src/topten.c
  topten()src/topten.c

Local Function readentry()

static void readentry ( FILE* rfile, struct toptenentry* tt )
Prototyped in: src/topten.c
Calls: str2role()src/role.c
  fscanf(), strcpy()
Called by: prscore()src/topten.c
  topten()src/topten.c
  tt_oname()src/topten.c
References Variables: rolessrc/role.c

Local Function score_wanted()

static int score_wanted ( boolean current_ver, int rank, struct toptenentry* t1, int playerct, const char** players, int uid )
Prototyped in: src/topten.c
Calls: digit()src/hacklib.c
  atoi(), strcmp(), strncmp()
Called by: prscore()src/topten.c

Local Function topten_print()

static void topten_print ( const char* x )
Prototyped in: src/topten.c
Called by: outentry()src/topten.c
  outheader()src/topten.c
  topten()src/topten.c
References Variables: toptenwinsrc/topten.c
  windowprocs

Local Function topten_print_bold()

static void topten_print_bold ( const char* x )
Prototyped in: src/topten.c
Called by: outentry()src/topten.c
References Variables: toptenwinsrc/topten.c
  windowprocs

Local Function writeentry()

static void writeentry ( FILE* rfile, struct toptenentry* tt )
Prototyped in: src/topten.c
Calls: onlyspace()src/hacklib.c
  fprintf()
Called by: topten()src/topten.c