3.2.28. prompt_text

Displays a dialog containing message text, and Ok and Cancel buttons.

Note

This macro is not available in the headless debugger.

Syntax

int prompt_text (message, buff)
char *message;
char *buff;

where:

message

The message text that appears at the top of the dialog.

buff

The buffer that is to contain the user response.

Description

This macro displays a dialog containing message text, and Ok and Cancel buttons. The user response is entered into the buffer (local or target).

Return value

int

One of the following:

0

OK

1

Cancel

Rules

None

Example

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;
}
.

See Also

Copyright © 2002-2009 ARM Limited. All rights reserved.ARM DUI 0175K
Non-Confidential