VReadMenucomFile
Name
VReadMenucomFile - reads the vertical and horizontal menu information.
Synopsis
VReadMenucomFile(vertical_menu_info, horizontal_menu_info, cmd,
process, function, filetype, terminal_leaf_node)
VerticalMenuInfo *vertical_menu_info; /*RETURN*/
HorizontalMenuInfo horizontal_menu_info[MAX_HORIZONTAL_MENUS]; /*RETURN*/
char cmd[30]; /*RETURN*/
char process[30]; /*RETURN*/
char function[30]; /*RETURN*/
char filetype[100]; /*RETURN*/
int *terminal_leaf_node; /*RETURN*/
Description
VReadMenucomFile reads the vertical and horizontal menu information, the
current command, process and function names from the MENU.COM file. The
value of the process is the name of the process if the associated command
calls a process, else it's an empty string. The value of the function is
"vertical" if the menu in the next level is to be displayed vertically,
"horizontal" if the menu in the next level is to be displayed horizontally,
or an empty string if no menu is to be displayed. VReadMenucomFile should be
called after VSelectMenuItem to get the name of the process or function
associated with the current command.
Structures
typedef struct {
short up; /*vertical menu on(1)/off(0)*/
short x,y; /*top-left cood of vertical menu*/
short width; /*the width of the vertical menu*/
short height; /*the height of the vertical menu*/
} VerticalMenuInfo;
typedef struct {
short on; /*horizontal menu on(1)/off(0)*/
short item_selected; /*horizontal menu selected*/
short cmd_wd; /*the width of horizontal command*/
} HorizontalMenuInfo;
Return Value
0 - work successfully.
2 - read error.
4 - cannot open MENU.COM file.
Parameters
vertical_menu_info - returns the verticl menu information.
horizontal_menu_info - returns the horizontal menu information.
cmd - returns the current command.
process - returns the process associated with the current command.
function - returns the function associated with the current command.
filetype - returns the file types associated with the current command;
this is read from the MENU.COM file.
terminal_leaf_node - returns the information whether the current command
is a terminal leaf node or not.
Side Effects
None.
Entry Conditions
If vertical_menu_info, horizontal_menu_info, cmd, process, or function is
NULL, VReadMenucomFile prints an error message to the standard error stream,
produces a core dump file and exits from the current process.
Related Functions
VDisplayMenu,
VRemoveMenus,
VSelectMenuItem,
VRedisplayMenus,
VWriteMenucomFile,
VGetMenuInformation.