File src/cmd.c

Resistances to troubles

References Functions: doapply()src/apply.c
  doattributes()src/cmd.c
  doconduct()src/cmd.c
  doextcmd()src/cmd.c
  doextlist()src/cmd.c
  doinvoke()src/artifact.c
  dojump()src/apply.c
  domonability()src/cmd.c
  doprev_message()src/cmd.c
  dorub()src/apply.c
  enter_explore_mode()src/cmd.c
  wiz_detect()src/cmd.c
  wiz_genesis()src/cmd.c
  wiz_identify()src/cmd.c
  wiz_level_tele()src/cmd.c
  wiz_map()src/cmd.c
  wiz_show_seenv()src/cmd.c
  wiz_show_stats()src/cmd.c
  wiz_show_vision()src/cmd.c
  wiz_show_wmodes()src/cmd.c
  wiz_where()src/cmd.c
  wiz_wish()src/cmd.c
  ddocall(), ddoinv(), do_mname(), docast(), doclose(), doddoremarm(), doddrop(), dodip(), dodiscovered(), dodown(), dodrink(), dodrop(), doeat(), doengrave(), doextversion(), dofire(), doforce(), dohelp(), dohistory(), doidtrap(), dokick(), dolook(), doloot(), done2(), donull(), doopen(), doorganize(), dopay(), dopickup(), dopramulet(), doprarm(), dopray(), doprgold(), doprinuse(), doprring(), doprtool(), doprwep(), doputon(), doquickwhatis(), doread(), doredraw(), doremring(), doride(), dosacrifice(), dosave(), dosearch(), doset(), dosh(), dosit(), dosuspend(), doswapweapon(), dotakeoff(), dotalk(), dotele(), dothrow(), dotogglepickup(), doturn(), dotwoweapon(), dotypeinv(), dountrap(), doup(), doversion(), dovspell(), dowear(), dowhatdoes(), dowhatis(), dowield(), dowieldquiver(), dowipe(), dozap(), enhance_weapon_skill(), wiz_light_sources(), wiz_timeout_queue()


Included Files


Preprocessor definitions

#define NR_OF_EOFS 20

#define BSIZE 20

#define MAX_EXT_CMD 40

#define enl_msg( prefix, present, past, suffix )

#define you_are( attr )

#define you_have( attr )

#define you_can( attr )

#define you_have_been( goodthing )

#define you_have_never( badthing )

#define you_have_X( something )

#define M( c )

#define C( c )

#define unctrl( c )

#define unmeta( c )


Global Variable extcmdlist

struct ext_func_tab extcmdlist[]
Visible in:  src/cmd.c
Used in: add_debug_extended_commands()src/cmd.c
  doextcmd()src/cmd.c
  doextlist()src/cmd.c
  extcmd_via_menu()src/cmd.c

Global Variable fn

int (*fn)(void)
Visible in:  src/cmd.c

Global Variable txt

const char* txt
Visible in:  src/cmd.c

Global Variable xtime

int xtime
Visible in:  src/cmd.c

Local Variables

timed_occ_fn
static int (*timed_occ_fn)(void)
Used in: set_occupation()
  timed_occupation()

pushq
static char pushq[20]
Used in: popch()
  pushch()

saveq
static char saveq[20]
Used in: popch()
  rhack()
  savech()

phead
static int phead
Used in: popch()
  pushch()
  savech()

ptail
static int ptail
Used in: popch()
  pushch()
  savech()

shead
static int shead
Used in: popch()
  savech()

stail
static int stail
Used in: popch()
  rhack()
  savech()

en_win
static winid en_win
Used in: enlght_line()
  enlightenment()
  show_conduct()

You_
static const char* You_
Used in: enlightenment()
  show_conduct()

are
static const char* are
Used in: enlightenment()

were
static const char* were
Used in: enlightenment()
  show_conduct()

have
static const char* have
Used in: enlightenment()
  show_conduct()

had
static const char* had
Used in: enlightenment()

can
static const char* can
Used in: enlightenment()

could
static const char* could
Used in: enlightenment()

have_been
static const char* have_been
Used in: show_conduct()

have_never
static const char* have_never
Used in: show_conduct()

never
static const char* never
Used in: show_conduct()

cmdlist
static const struct func_tab cmdlist[]
Used in: rhack()

debug_extcmdlist
static const struct ext_func_tab debug_extcmdlist[]
Used in: add_debug_extended_commands()

template
static const char* template
Used in: contained()
  mon_chain()
  mon_invent_chain()
  obj_chain()
  wiz_show_stats()

count_str
static const char* count_str
Used in: wiz_show_stats()

separator
static const char* separator
Used in: wiz_show_stats()

last_multi
static int last_multi
Used in: parse()


Global Function add_debug_extended_commands()

void add_debug_extended_commands ( void )
Prototyped in: include/extern.h
Calls: strcmp()
Called by: moveloop()src/allmain.c
References Variables: debug_extcmdlistsrc/cmd.c
  extcmdlistsrc/cmd.c

Global Function click_to_cmd()

int click_to_cmd ( int x, int y, int mod )
Prototyped in: include/extern.h
Calls: xytod()src/cmd.c
  abs(), sgn()
Called by: readchar()src/cmd.c
References Variables: iflags, ndir, sdir, u

Global Function confdir()

void confdir ( void )
Prototyped in: include/extern.h
Calls: rn2()
Called by: getdir()src/cmd.c
  use_stethoscope()src/apply.c
  use_whip()src/apply.c
References Variables: u, xdir, ydir

Global Function doextlist()

int doextlist ( void )
Prototyped in: include/extern.h
Calls: sprintf()
Used in:  src/cmd.c
  doextcmd()src/cmd.c
References Variables: extcmdlistsrc/cmd.c
  windowprocs

Global Function dtoxy()

void dtoxy ( coord* cc, int dd )
Prototyped in: include/extern.h
References Variables: xdir, ydir

Global Function enlightenment()

void enlightenment ( int final )
Prototyped in: include/extern.h
Calls: defends()src/artifact.c
  enlght_line()src/cmd.c
  stone_luck()src/attrib.c
  a_monnam(), abs(), an(), body_part(), can_pray(), carrying(), dmgtype(), eos(), impossible(), makeplural(), on_level(), ordin(), resists_drli(), resists_magm(), sprintf(), sticks(), strcpy(), u_gname(), y_monnam()
Called by: arti_invoke()src/artifact.c
  doattributes()src/cmd.c
References Variables: You_src/cmd.c
  aresrc/cmd.c
  cansrc/cmd.c
  couldsrc/cmd.c
  en_winsrc/cmd.c
  hadsrc/cmd.c
  havesrc/cmd.c
  weresrc/cmd.c
  c_common_strings, dungeon_topology, flags, mons, u, uwep, windowprocs, youmonst

Global Function extcmd_via_menu()

int extcmd_via_menu ( void )
Prototyped in: include/extern.h
Calls: free(), sprintf(), strcat(), strlen(), strncmp(), strncmpi()
References Variables: extcmdlistsrc/cmd.c
  windowprocs

Global Function getdir()

int getdir ( const char* s )
Prototyped in: include/extern.h
Calls: confdir()src/cmd.c
  movecmd()src/cmd.c
  readchar()src/cmd.c
  savech()src/cmd.c
  pline(), rn2(), strchr()
Called by: use_camera()src/apply.c
  use_figurine()src/apply.c
  use_leash()src/apply.c
  use_mirror()src/apply.c
  use_stethoscope()src/apply.c
  use_whip()src/apply.c
References Variables: in_doagain, quitchars, u, windowprocs, youmonst

Global Function isok()

int isok ( int x, int y )
Prototyped in: include/extern.h
Called by: do_break_wand()src/apply.c
  figurine_location_checks()src/apply.c
  jump()src/apply.c
  use_stethoscope()src/apply.c

Global Function movecmd()

int movecmd ( char sym )
Prototyped in: include/extern.h
Calls: strchr()
Called by: getdir()src/cmd.c
  rhack()src/cmd.c
References Variables: iflags, ndir, sdir, u, xdir, ydir, zdir

Global Function pgetchar()

char pgetchar ( void )
Prototyped in: include/extern.h
Calls: popch()src/cmd.c
Called by: readchar()src/cmd.c
References Variables: windowprocs

Global Function pushch()

void pushch ( char ch )
Prototyped in: include/extern.h
Called by: moveloop()src/allmain.c
  stop_occupation()src/allmain.c
References Variables: pheadsrc/cmd.c
  ptailsrc/cmd.c
  pushqsrc/cmd.c

Global Function readchar()

char readchar ( void )
Prototyped in: include/extern.h
Calls: click_to_cmd()src/cmd.c
  end_of_input()src/cmd.c
  pgetchar()src/cmd.c
  clearerr()
Called by: getdir()src/cmd.c
  parse()src/cmd.c
References Variables: in_doagain, u, windowprocs

Global Function reset_occupations()

void reset_occupations ( void )
Prototyped in: include/extern.h
Calls: reset_trapset()src/apply.c
  reset_pick(), reset_remarm()

Global Function rhack()

void rhack ( char* cmd )
Prototyped in: include/extern.h
Calls: movecmd()src/cmd.c
  parse()src/cmd.c
  rhack()src/cmd.c
  set_occupation()src/cmd.c
  Norep(), You_cant(), ddoinv(), domove(), lowc()
Called by: moveloop()src/allmain.c
  rhack()src/cmd.c
References Variables: cmdlistsrc/cmd.c
  saveqsrc/cmd.c
  stailsrc/cmd.c
  flags, iflags, in_doagain, multi, occupation, u, windowprocs

Global Function sanity_check()

void sanity_check ( void )
Prototyped in: include/extern.h
Calls: obj_sanity_check(), timer_sanity_check()
Called by: moveloop()src/allmain.c

Global Function savech()

void savech ( char ch )
Prototyped in: include/extern.h
Called by: getdir()src/cmd.c
  moveloop()src/allmain.c
  parse()src/cmd.c
References Variables: pheadsrc/cmd.c
  ptailsrc/cmd.c
  saveqsrc/cmd.c
  sheadsrc/cmd.c
  stailsrc/cmd.c
  in_doagain

Global Function set_occupation()

void set_occupation ( int fn, int txt, int xtime )
Prototyped in: include/extern.h
Called by: rhack()src/cmd.c
  use_trap()src/apply.c
References Functions: timed_occupation()src/cmd.c
References Variables: timed_occ_fnsrc/cmd.c
  occtime, occtxt, occupation

Global Function show_conduct()

void show_conduct ( int final )
Prototyped in: include/extern.h
Calls: enlght_line()src/cmd.c
  num_genocides(), sprintf()
Called by: doconduct()src/cmd.c
References Variables: You_src/cmd.c
  en_winsrc/cmd.c
  havesrc/cmd.c
  have_beensrc/cmd.c
  have_neversrc/cmd.c
  neversrc/cmd.c
  weresrc/cmd.c
  flags, u, windowprocs

Global Function xytod()

int xytod ( schar x, schar y )
Prototyped in: include/extern.h
Called by: click_to_cmd()src/cmd.c
References Variables: xdir, ydir

Local Function contained()

static void contained ( winid win, const char* src, long* total_count, long* total_size )
Prototyped in: src/cmd.c
Calls: count_obj()src/cmd.c
  sprintf()
Called by: wiz_show_stats()src/cmd.c
References Variables: templatesrc/cmd.c
  invent, level, migrating_mons, migrating_objs, windowprocs

Local Function count_obj()

static void count_obj ( struct obj* chain, long* total_count, long* total_size, boolean top, boolean recurse )
Prototyped in: src/cmd.c
Calls: count_obj()src/cmd.c
Called by: contained()src/cmd.c
  count_obj()src/cmd.c
  mon_invent_chain()src/cmd.c
  obj_chain()src/cmd.c

Local Function doattributes()

static int doattributes ( void )
Prototyped in: src/cmd.c
Calls: enlightenment()src/cmd.c
  minimal_enlightenment()src/cmd.c
Used in:  src/cmd.c
References Variables: flags

Local Function doconduct()

static int doconduct ( void )
Prototyped in: src/cmd.c
Calls: show_conduct()src/cmd.c
Used in:  src/cmd.c

Local Function doextcmd()

static int doextcmd ( void )
Prototyped in: src/cmd.c
Used in:  src/cmd.c
References Functions: doextlist()src/cmd.c
References Variables: extcmdlistsrc/cmd.c
  windowprocs

Local Function domonability()

static int domonability ( void )
Prototyped in: src/cmd.c
Calls: use_unicorn_horn()src/apply.c
  There(), You(), aggravate(), attacktype(), dobreathe(), doconfuse(), dohide(), domindblast(), doremove(), dospinweb(), dospit(), dosummon(), dryup(), pline(), split_mon()
Used in:  src/cmd.c
References Variables: level, mons, u, youmonst

Local Function doprev_message()

static int doprev_message ( void )
Prototyped in: src/cmd.c
Used in:  src/cmd.c
References Variables: windowprocs

Local Function end_of_input()

static void end_of_input ( void )
Prototyped in: src/cmd.c
Calls: clearlocks(), dosave0(), terminate()
Called by: readchar()src/cmd.c
References Variables: program_state, windowprocs

Local Function enlght_line()

static void enlght_line ( const char* start, const char* middle, const char* end )
Prototyped in: src/cmd.c
Calls: sprintf()
Called by: enlightenment()src/cmd.c
  show_conduct()src/cmd.c
References Variables: en_winsrc/cmd.c
  windowprocs

Local Function enter_explore_mode()

static int enter_explore_mode ( void )
Prototyped in: src/cmd.c
Calls: You(), pline()
Used in:  src/cmd.c
References Variables: WIN_MESSAGE, flags, windowprocs, ynchars

Local Function minimal_enlightenment()

static void minimal_enlightenment ( void )
Prototyped in: src/cmd.c
Calls: align_gname(), align_str(), poly_gender(), sprintf()
Called by: doattributes()src/cmd.c
References Variables: flags, genders, plname, u, urace, urole, windowprocs, youmonst

Local Function mon_chain()

static void mon_chain ( winid win, const char* src, struct monst* chain, long* total_count, long* total_size )
Prototyped in: src/cmd.c
Calls: sprintf()
Called by: wiz_show_stats()src/cmd.c
References Variables: templatesrc/cmd.c
  windowprocs

Local Function mon_invent_chain()

static void mon_invent_chain ( winid win, const char* src, struct monst* chain, long* total_count, long* total_size )
Prototyped in: src/cmd.c
Calls: count_obj()src/cmd.c
  sprintf()
Called by: wiz_show_stats()src/cmd.c
References Variables: templatesrc/cmd.c
  windowprocs

Local Function obj_chain()

static void obj_chain ( winid win, const char* src, struct obj* chain, long* total_count, long* total_size )
Prototyped in: src/cmd.c
Calls: count_obj()src/cmd.c
  sprintf()
Called by: wiz_show_stats()src/cmd.c
References Variables: templatesrc/cmd.c
  windowprocs

Local Function parse()

static char* parse ( void )
Prototyped in: src/cmd.c
Calls: readchar()src/cmd.c
  savech()src/cmd.c
  flush_screen(), pline(), sprintf()
Called by: rhack()src/cmd.c
References Variables: last_multisrc/cmd.c
  WIN_MESSAGE, flags, iflags, in_doagain, multi, save_cm, windowprocs

Local Function popch()

static char popch ( void )
Prototyped in: src/cmd.c
Called by: pgetchar()src/cmd.c
References Variables: pheadsrc/cmd.c
  ptailsrc/cmd.c
  pushqsrc/cmd.c
  saveqsrc/cmd.c
  sheadsrc/cmd.c
  stailsrc/cmd.c
  in_doagain, occupation

Local Function timed_occupation()

static int timed_occupation ( void )
Prototyped in: src/cmd.c
Used in: set_occupation()src/cmd.c
References Variables: timed_occ_fnsrc/cmd.c
  multi

Local Function wiz_detect()

static int wiz_detect ( void )
Prototyped in: src/cmd.c
Calls: findit(), pline()
Used in:  src/cmd.c
References Variables: flags

Local Function wiz_genesis()

static int wiz_genesis ( void )
Prototyped in: src/cmd.c
Calls: create_particular(), pline()
Used in:  src/cmd.c
References Variables: flags

Local Function wiz_identify()

static int wiz_identify ( void )
Prototyped in: src/cmd.c
Calls: identify_pack(), pline()
Used in:  src/cmd.c
References Variables: flags

Local Function wiz_level_tele()

static int wiz_level_tele ( void )
Prototyped in: src/cmd.c
Calls: level_tele(), pline()
Used in:  src/cmd.c
References Variables: flags

Local Function wiz_map()

static int wiz_map ( void )
Prototyped in: src/cmd.c
Calls: do_mapping(), map_trap(), pline()
Used in:  src/cmd.c
References Variables: flags, ftrap

Local Function wiz_show_seenv()

static int wiz_show_seenv ( void )
Prototyped in: src/cmd.c
Calls: sprintf()
Used in:  src/cmd.c
References Variables: level, u, windowprocs

Local Function wiz_show_stats()

static int wiz_show_stats ( void )
Prototyped in: src/cmd.c
Calls: contained()src/cmd.c
  mon_chain()src/cmd.c
  mon_invent_chain()src/cmd.c
  obj_chain()src/cmd.c
  sprintf()
Used in:  src/cmd.c
References Variables: count_strsrc/cmd.c
  separatorsrc/cmd.c
  templatesrc/cmd.c
  invent, level, migrating_mons, migrating_objs, windowprocs

Local Function wiz_show_vision()

static int wiz_show_vision ( void )
Prototyped in: src/cmd.c
Calls: sprintf()
Used in:  src/cmd.c
References Variables: u, viz_array, windowprocs

Local Function wiz_show_wmodes()

static int wiz_show_wmodes ( void )
Prototyped in: src/cmd.c
Used in:  src/cmd.c
References Variables: level, u, windowprocs

Local Function wiz_where()

static int wiz_where ( void )
Prototyped in: src/cmd.c
Calls: pline(), print_dungeon()
Used in:  src/cmd.c
References Variables: flags

Local Function wiz_wish()

static int wiz_wish ( void )
Prototyped in: src/cmd.c
Calls: encumber_msg(), makewish(), pline()
Used in:  src/cmd.c
References Variables: flags