#include <stdio.h>#include <stdlib.h>#include <ctype.h>#include <string.h>#include "advent.h"#include "advdec.h"Include dependency graph for utility.c:

Go to the source code of this file.
Functions | |
| boolean | ajar (int item) |
| boolean | at (int item) |
| boolean | athand (int item) |
| void | bitoff (int obj, int bit) |
| void | biton (int obj, int bit) |
| boolean | bitset (long state, int bit) |
| boolean | blind () |
| int | burden (int obj) |
| void | carry (int obj, int where) |
| int | confuz () |
| boolean | dark () |
| int | dcheck () |
| boolean | dead (int obj) |
| void | drop (int obj, int where) |
| void | destroy (int obj) |
| boolean | edible (int obj) |
| boolean | enclosed (int item) |
| void | extract (int obj) |
| int | forced (int at_loc) |
| boolean | here (int item) |
| boolean | hinged (int object) |
| boolean | holding (int item) |
| void | insert (int obj, int contnr) |
| boolean | inside (int loc) |
| void | juggle (int obj) |
| int | liq (int item) |
| int | liq2 (int liquid) |
| int | liqloc (int loc) |
| boolean | living (int obj) |
| boolean | locked (int item) |
| boolean | locks (int item) |
| void | lookin (int contnr) |
| void | move (int obj, int where) |
| int | noway () |
| boolean | opaque (int obj) |
| boolean | outside (int loc) |
| int | pct (int x) |
| boolean | plural (int obj) |
| boolean | portal (int loc) |
| boolean | printed (int obj) |
| int | put (int obj, int where, int pval) |
| int | ranz (int range) |
| boolean | small (int obj) |
| int | toting (int item) |
| boolean | treasr (int obj) |
| boolean | vessel (int obj) |
| boolean | wearng (int item) |
| boolean | worn (int obj) |
| void | bug (unsigned int n) |
| char * | ask (char *prompt, char *buf, int buflen) |
| void | panic (char *msg, boolean save) |
Variables | |
| static char * | e_msg [] |
|
|
Definition at line 17 of file utility.c. References bitset, g, hinged(), playinfo::obj_state, OPENBT, and vessel(). Referenced by athand(), lookin(), turn(), vclose(), vextract(), vinsert(), vlook(), vopen(), vpour(), and vtake(). |
|
||||||||||||||||
|
Definition at line 714 of file utility.c. References c, EOF, FALSE, fflush(), fgets(), fputs(), getchar, isspace, panic, stdin, stdout, and strlen(). Referenced by add(), ask_kbuf(), delete(), ed_dorep(), f_kbuffer(), f_retsup(), f_selbuffer(), f_selxbuffer(), getwords(), hack_file(), itverb(), iwritfile(), mediator(), slave(), srch_ask(), u_r_file(), and yes(). |
|
|
Definition at line 27 of file utility.c. References FALSE, playinfo::fixed, g, playinfo::loc, MAXOBJ, and playinfo::place. Referenced by descitem(), do_hint(), doobj(), dotrav(), english(), itverb(), ivkill(), main(), proxy(), vblow(), vdrop(), vfind(), vhit(), vpour(), vthrow(), vwake(), vwave(), and vyank(). |
|
|
Definition at line 40 of file utility.c. References ajar(), enclosed(), g, holding(), playinfo::loc, playinfo::place, and toting(). Referenced by blind(), dark(), do_hint(), do_scoop_up(), doobj(), dopirate(), itverb(), ivdrink(), vdrink(), vlock(), vlook(), voff(), von(), vopen(), vtake(), and vunlock(). |
|
||||||||||||
|
Definition at line 57 of file utility.c. References g, L, playinfo::obj_state, and val. Referenced by death(), ivcombo(), stimer(), vclose(), vdrink(), vdrop(), vinsert(), vlock(), vpour(), vtake(), and vunlock(). |
|
||||||||||||
|
Definition at line 69 of file utility.c. References g, L, playinfo::obj_state, and val. Referenced by ivcombo(), stimer(), vkill(), vlock(), vopen(), vplay(), vpour(), vunlock(), vwave(), and vwear(). |
|
||||||||||||
|
|
|
|
Definition at line 91 of file utility.c. References athand(), dark(), g, LAMP, playinfo::loc, and playinfo::prop. |
|
|
Definition at line 698 of file utility.c. References e_msg, fprintf(), panic, stderr, and TRUE. Referenced by actspk(), carry(), do_hint(), dotrav(), extract(), insert(), itverb(), rdskip(), and trverb(). |
|
|
Definition at line 112 of file utility.c. References BOAT, g, i, MAXOBJ, playinfo::place, sum(), toting(), and playinfo::weight. Referenced by do_hint(), spcmove(), vextract(), and vtake(). |
|
||||||||||||
|
Definition at line 142 of file utility.c. References playinfo::atloc, bug(), g, playinfo::link, MAXOBJ, and playinfo::place. Referenced by _do_add(), _one_mult(), b64_add(), bc_divide(), insert(), move(), vtake(), and vyank(). |
|
|
Definition at line 169 of file utility.c. Referenced by check_next(), english(), vlook(), vpick(), vplay(), vread(), vtake(), and vturn(). |
|
|
Definition at line 188 of file utility.c. References athand(), g, LAMP, LIGHT, playinfo::loc, playinfo::loc_attrib, and playinfo::prop. Referenced by blind(), describe(), ivread(), turn(), and voff(). |
|
|
Definition at line 198 of file utility.c. References playinfo::dloc, DWARFMAX, g, i, playinfo::loc, and return(). Referenced by doobj(), ivkill(), ivtake(), vfind(), and vthrow(). |
|
|
Definition at line 211 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 238 of file utility.c. References move. Referenced by gz_open(), gzclose(), stimer(), vdrop(), veat(), vinsert(), vkill(), and vopen(). |
|
||||||||||||
|
Definition at line 220 of file utility.c. References playinfo::atloc, playinfo::fixed, g, playinfo::link, MAXOBJ, and playinfo::place. Referenced by death(), dwarves(), inflate_table(), inflate_table9(), initialize(), move(), spcmove(), vbreak(), vdrink(), vdrop(), vfill(), vhit(), vinsert(), vlock(), vopen(), vtake(), and vwave(). |
|
|
Definition at line 248 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 257 of file utility.c. References FALSE, g, MAXOBJ, and playinfo::place. Referenced by athand(), move(), spcmove(), toting(), vbreak(), vdrop(), vextract(), vfill(), vinsert(), vlock(), vlook(), vtake(), and vwear(). |
|
|
Definition at line 270 of file utility.c. References bug(), g, playinfo::hlink, playinfo::holder, and playinfo::place. |
|
|
Definition at line 297 of file utility.c. References g, and playinfo::loc_attrib. |
|
|
Definition at line 306 of file utility.c. References g, playinfo::loc, playinfo::place, and toting(). Referenced by do_hint(), doobj(), dopirate(), extract(), itverb(), iveat(), ivfill(), ivfoo(), ivkill(), ivread(), parsefname(), parseheredoc(), turn(), vdrop(), veat(), vfeed(), vplay(), and vtake(). |
|
|
Definition at line 315 of file utility.c. References bitset, g, and playinfo::obj_state. Referenced by ajar(), english(), ivopen(), vclose(), vlock(), vopen(), and vunlock(). |
|
|
Definition at line 324 of file utility.c. References FALSE, g, MAXOBJ, and playinfo::place. Referenced by athand(), doobj(), inventory(), ivpour(), spcmove(), toting(), vbreak(), vdrink(), vdrop(), vfill(), vinsert(), vkill(), vlock(), vopen(), vpour(), vread(), vtake(), vthrow(), vwave(), and vwear(). |
|
||||||||||||
|
Definition at line 336 of file utility.c. References bug(), carry(), g, playinfo::hlink, playinfo::holder, playinfo::loc, and playinfo::place. Referenced by file_insert(), S(), vfill(), vinsert(), and vtake(). |
|
|
Definition at line 354 of file utility.c. References outside(), and portal(). Referenced by dwarves(), isSubdirOf(), stimer(), and vlook(). |
|
|
Definition at line 365 of file utility.c. References playinfo::fixed, g, i, j, MAXOBJ, move, and playinfo::place. |
|
|
Definition at line 380 of file utility.c. References BOTTLE, CASK, g, liq2(), and playinfo::prop. Referenced by doobj(), dopirate(), ivdrink(), ivpour(), vbreak(), vdrink(), vdrop(), vfill(), vfind(), and vpour(). |
|
|
Definition at line 396 of file utility.c. |
|
|
Definition at line 414 of file utility.c. References g, liq2(), and playinfo::loc_attrib. Referenced by doobj(), english(), ivdrink(), vdrink(), vfill(), and vfind(). |
|
|
Definition at line 423 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 432 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 441 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 450 of file utility.c. References ajar(), FALSE, g, playinfo::hlink, playinfo::holder, opaque(), printf, pspeak(), rspeak(), TRUE, and vessel(). Referenced by inventory(), and vlook(). |
|
||||||||||||
|
Definition at line 474 of file utility.c. References carry(), drop(), enclosed(), extract(), playinfo::fixed, g, MAXOBJ, and playinfo::place. |
|
|
Definition at line 495 of file utility.c. Referenced by ck_obj(), vclose(), vfeed(), vinsert(), vopen(), vput(), vtake(), vthrow(), and vturn(). |
|
|
Definition at line 520 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 529 of file utility.c. References bitset, g, and playinfo::loc_attrib. Referenced by domove(), inside(), isSubdirOf(), turn(), vblow(), and vdrink(). |
|
||||||||||||
|
Definition at line 740 of file utility.c. References exit(), EXIT_FAILURE, fprintf(), saveadv(), and stderr. |
|
|
Definition at line 538 of file utility.c. References ranz(). Referenced by check_next(), confuz(), describe(), do_battle(), dwarves(), itverb(), noway(), spcmove(), turn(), and vdrink(). |
|
|
Definition at line 547 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 556 of file utility.c. References bitset, g, and playinfo::loc_attrib. Referenced by inside(). |
|
|
Definition at line 565 of file utility.c. References bitset, g, and playinfo::obj_state. Referenced by timing_dmp(), and vlook(). |
|
||||||||||||||||
|
Definition at line 576 of file utility.c. References move. Referenced by check(), inflate(), inflateBack(), inflateBack9(), and print(). |
|
|
Definition at line 586 of file utility.c. References rand(). |
|
|
Definition at line 595 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 604 of file utility.c. References enclosed(), g, holding(), and playinfo::place. Referenced by athand(), burden(), death(), descitem(), describe(), do_hint(), do_scoop_up(), dopirate(), dotrav(), here(), ivfoo(), spcmove(), vdrop(), vextract(), vlock(), vtake(), and vyank(). |
|
|
Definition at line 624 of file utility.c. References bitset, g, and playinfo::obj_state. Referenced by dopirate(), and score(). |
|
|
Definition at line 633 of file utility.c. References bitset, g, and playinfo::obj_state. Referenced by ajar(), lookin(), vfill(), vinsert(), and vlook(). |
|
|
Definition at line 642 of file utility.c. References bitset, g, playinfo::obj_state, and WEARBT. Referenced by death(), inventory(), vdrink(), vinsert(), vtake(), and vwear(). |
|
|
Definition at line 651 of file utility.c. References bitset, g, and playinfo::obj_state. |
|
|
Definition at line 657 of file utility.c. Referenced by bug(). |
1.4.6