VWriteMenucomFile


 
Name
  VWriteMenucomFile - writes the 3DVIEWNIX menu information to MENU.COM file.
 
Synopsis
  VWriteMenucomFile(vertical_menu_info, horizontal_menu_info,
                cmd, process, function, filetype, terminal_leaf_node)
  VerticalMenuInfo *vertical_menu_info;
  HorizontalMenuInfo horizontal_menu_info[MAX_HORIZONTAL_MENUS];
  char cmd[30];
  char process[30];
  char function[30];
  char filetype[100];
  int terminal_leaf_node;
 
Description
  VWriteMenucomFile writes the 3DVIEWNIX menu information to MENU.COM file.
VWriteMenucomFile writes the vertical menu and horizontal menu information,
and current  command, process, and function names selected to MENU.COM file.
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 function is called.
 
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.
  3 - write error.
 
Parameters
  vertical_menu_info - vertical menu information to be written.
  horizontal_menu_info - horizontal_menu information to be written.
  cmd - the current command selected.
  process - the process associated with the current command.
  function - the function associated with the current command.
  filetype - the file types associated with the current command read from the
	MENU.COM file.
  terminal_leaf_node - indicates whether the selected 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, VWriteMenucomFile prints an error message to the standard error
stream, produces a core dump file and exits from the current process.
 
Related Functions
VDisplayMenu, VRemoveMenusVWriteData, VSelectMenuItem, VRedisplayMenus, VReadMenucomFile, VGetMenuInformation.