Data Structures | Functions
get.h File Reference

Go to the source code of this file.

Data Structures

struct  getset


void set_getfunctions (struct getset *go)
bool get_file (const char *suggested_name, char *path, size_t len)
bool get_string (const char *prompt, char *buf, size_t len)
 Prompt for a string from the user.
s16b get_quantity (const char *prompt, int max)
 Request a quantity from the user.
bool get_check (const char *prompt)
 Verify something with the user.
bool get_item (struct object **choice, const char *pmt, const char *fail, cmd_code cmd, item_filter filter, int mode)
bool get_direction (int *dir, bool allow_5)
bool get_target (int *dp)
int get_spell (const char *verb, bool(*spell_test)(int spell))

Function Documentation

bool get_check ( const char *  prompt)

Verify something with the user.

promptis the prompt to the user, and should take the form "Query? "
whether the user answered "y"

get_check_hook() should be set to a function which asks the user for a "y/n" answer

References getset::check, FALSE, and get_check_hook.

Referenced by context_menu_object(), death_randarts(), death_screen(), do_cmd_cast(), do_cmd_go_down(), do_cmd_wield(), do_cmd_wiz_jump(), do_cmd_wizard(), effect_handler_RECALL(), get_file_backup(), get_file_text(), key_confirm_command(), ranged_helper(), take_hit(), textui_cmd_debug(), textui_cmd_suicide(), ui_keymap_create(), verify_object(), and wiz_tweak_curse().

bool get_direction ( int dir,
bool  allow_5 

References getset::direction.

bool get_file ( const char *  suggested_name,
char *  path,
size_t  len 

References getset::file, and get_file_backup().

bool get_item ( struct object **  choice,
const char *  pmt,
const char *  fail,
cmd_code  cmd,
item_filter  filter,
int  mode 

References getset::item.

s16b get_quantity ( const char *  prompt,
int  max 

Request a quantity from the user.

promptis the prompt to the user, and should take the form "Prompt: "
maxis the maximum value to accept
the quantity

References get_quantity_hook, and getset::quantity.

Referenced by cmd_get_quantity(), do_cmd_wiz_effect(), get_debug_command(), store_purchase(), and store_sell().

int get_spell ( const char *  verb,
bool(*)(int spell)  spell_test 

References getset::spell.

bool get_string ( const char *  prompt,
char *  buf,
size_t  len 

Prompt for a string from the user.

promptis the prompt to the user, and should take the form "Prompt: "
bufis the user string, and the value passed in is the default
lenis the length of buf
whether the user accepted the entered value or escaped

References FALSE, getset::file, get_string_hook, and getset::string.

Referenced by choose_profile(), cmd_get_string(), do_cmd_note(), do_cmd_pref(), do_cmd_wiz_change_aux(), do_cmd_wiz_jump(), get_file_backup(), get_file_text(), glyph_command(), textui_cmd_rest(), textui_get_quantity(), wiz_quantity_item(), and wiz_tweak_item().

bool get_target ( int dp)

References getset::target.

void set_getfunctions ( struct getset go)