How the Current Menu Level Is Adjusted By an Action Function

Action functions return an integer value to km_select() to indicate what menu level to make active upon return from the action function. km_select() handles the return level by setting the next action code for each intervening menu to AC_EXIT.

If the action function returns EXITMENU, the next action codes for all menus (including the top-level menu) called to get to the current menu are set to AC_EXIT.

If the action function returns FUNCERROR, processing is aborted for all menus and mn_rd() returns 0. You can set the global error code VV_ERR to provide more information about the error to higher-level routines. You can use existing error codes or add your own error codes and messages. See Chapter 50, "Debugging and Error Handling." for instructions on adding more error codes and error messages.


Home Contents Previous Next