| |||
| Home > RealView Debugger Predefined Macros > Alphabetical predefined macro reference > prompt_text | |||
Displays a dialog containing message text, and Ok and Cancel buttons.
This macro is not available in the headless debugger.
int prompt_text (message, buff)
char *message;
char *buff;
where:
messageThe message text that appears at the top of the dialog.
buffThe buffer that is to contain the user response.
This macro displays a dialog containing message text, and Ok and Cancel buttons. The user response is entered into the buffer (local or target).
This example shows how to use prompt_text in
a macro:
define /R int usrPrompt()
{
char userPromptBuffer[100];
int retval;
retval = prompt_text( "Please enter text", userPromptBuffer );
if (retval == 0) {
$printf "Pressed OK\n"$;
$printf "%s\n", userPromptBuffer$;
} else
$printf "Pressed Cancel\n"$;
return retval;
}
.
The following macros provide similar or related functionality:
prompt_file on prompt_file
prompt_list on prompt_list
prompt_yesno on prompt_yesno
prompt_yesnocancel on prompt_yesno_cancel.