Displays a menu and reads the user's response.
#include <diag/diago.h> long diag_display ( mnum, fdes, msglist, proctype, scrtype, menutype, menuinfo ) long mnum; nl_catd fdes; struct msglist msglist[ ]; long proctype; long scrtype; ASL_SCR_TYPE *menutype; ASL_SCR_INFO *menuinfo;
The diag_display subroutine displays a menu that has multiple user selections and reads the user's response.
Parameter | Description |
---|---|
mnum | Menu number that is displayed, right-justified, as a hex number at the top-right corner of the screen. |
fdes | Open catalog file descriptor returned from the diag_catopen system call. |
msglist | Array of set numbers and message IDs. The msglist parameter must be ended by a Null element. |
proctype | Specifies the type of operation to be performed. This parameter has
the following values:
|
scrtype | Specifies the type of screen to be displayed, where each type determines the format of the output and the active function keys for the user. |
menutype | Defined in the file /usr/include/asl.h. If this parameter is equal to Null, the default version is used. Otherwise, the application's version is used. |
menuinfo | Defined in the file /usr/include/asl.h. If this field is not equal to Null, it is initialized with the retrieved messages. |
The diag_display subroutine returns one of the following values:
Return Value | Description |
---|---|
DIAG_ASL_OK | Successful return. |
DIAG_ASL_ARGS1 | Both the msglist and menuinfo parameters were Null. |
DIAG_ASL_ARGS2 | DIAG_MSGONLY option was specified, but no messages were named. |
DIAG_MALLOCFAILED | Memory allocation was unsuccessful. |
DIAG_ASL_ENTER | Enter Function key was entered. |
DIAG_ASL_EXIT | Exit Function key was entered. |
DIAG_ASL_CANCEL | Cancel Function key was entered. |
DIAG_ASL_HELP | Help Function key was entered. |
DIAG_ASL_LIST | List Function key was entered. |
DIAG_ASL_COMMIT | Commit Function key was entered. |
DIAG_ASL_PRINT | Print Function key was entered. |