VReadMenutreeFile


 
Name
  VReadMenutreeFile - reads the menu tree information from the TREEINFO.COM
file.
 
Synopsis
  VReadMenutreeFile(treeinfo, num_of_treeinfo)
  TreeInfo **treeinfo;                  /*RETURN*/
  short *num_of_treeinfo;               /*RETURN*/
 
Description
  VReadMenutreeFile reads the menu tree information from the TREEINFO.COM
file. If the TREEINFO.COM file exists, VReadMenutreeFile allocates memory
for treeinfo and reads the information from TREEINFO.COM file into treeinfo
array, assigns the number of elements in the array to num_of_treeinfo.
 
Structures
  typedef struct {
        char cmd[30];		/*the current command selected*/
        char function[30];	/*the current function selected*/
        char process[30];	/*the current process being executed*/
        char filetype[100];	/*the types of files to be read*/
        short father;		/*the father fo the current process*/
        short sibling;		/*the first sibling of the current process*/
        short son;		/*the first child of the current process*/
        short x,y;		/*the top-left cood of the current command*/
        short terminal_leaf_node;/*terminal node(1) or not(0)*/
  } TreeInfo;
 
Return Value
  0 - work successfully.
  1 - memory allocation error.
  2 - read error.
  4 - cannot open TREEINFO.COM file.
 
Parameters
  treeinfo - returns the menu tree information.
  num_of_treeinfo - returns the number of elements in the treeinfo array.
 
Side Effects
  None.
 
Entry Conditions
  If treeinfo or num_of_treeinfo is NULL, VReadMenutreeFile prints an error
message to the standard error stream, produces a core dump file and
exits from the current process.
 
Related Functions
  None.