1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-07-21 16:14:14 -04:00

Rename the function getanswer() to get_yn_answer()

This commit is contained in:
John Zaitseff 2011-07-11 13:37:48 +10:00
parent 36a3811cd1
commit 019734c8aa
2 changed files with 24 additions and 24 deletions

View File

@ -390,26 +390,7 @@ int attrpr (WINDOW *win, int attr, const char *format, ...)
************************************************************************/
/*-----------------------------------------------------------------------
Function: gettxchar - Read a keyboard character
Arguments: win - Window to use
Returns: int - Keyboard character
This function reads a single character from the keyboard. The key is
NOT echoed to the screen and the cursor visibility is NOT affected.
*/
int gettxchar (WINDOW *win)
{
keypad(win, true);
meta(win, true);
wtimeout(win, -1);
return wgetch(win);
}
/*-----------------------------------------------------------------------
Function: getanswer - Read a Yes/No answer and return true/false
Function: get_yn_answer - Read a Yes/No answer and return true/false
Arguments: win - Window to use
Returns: bool - true if Yes ("Y") was selected, else false
@ -419,7 +400,7 @@ int gettxchar (WINDOW *win)
the cursor becomes invisible after this function.
*/
bool getanswer (WINDOW *win)
bool get_yn_answer (WINDOW *win)
{
int key;
bool ok;
@ -453,6 +434,25 @@ bool getanswer (WINDOW *win)
}
/*-----------------------------------------------------------------------
Function: gettxchar - Read a keyboard character
Arguments: win - Window to use
Returns: int - Keyboard character
This function reads a single character from the keyboard. The key is
NOT echoed to the screen and the cursor visibility is NOT affected.
*/
int gettxchar (WINDOW *win)
{
keypad(win, true);
meta(win, true);
wtimeout(win, -1);
return wgetch(win);
}
/*-----------------------------------------------------------------------
Function: gettxline - Read a line from the keyboard (generic)
Arguments: win - Window to use

View File

@ -157,8 +157,8 @@ extern int attrpr (WINDOW *win, int attr, const char *format, ...)
// Input routines
extern bool get_yn_answer (WINDOW *win);
extern int gettxchar (WINDOW *win);
extern bool getanswer (WINDOW *win);
extern int gettxline (WINDOW *win, char *buf, int bufsize, bool multifield,
int maxlen, const char *emptyval, const char *defaultval,
const char *allowed, bool stripspc, int y, int x,