

            mktr$ (6) --- convert a pathname into a treename         03/25/82


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function mktr$ (path, tree)
                 character path (ARB), tree (MAXPATH)

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Mktr$'  is  used  to  convert  a Subsystem pathname into an
                 equivalent Primos treename.  The argument 'path' is an  EOS-
                 terminated  string  containing the pathname to be converted.
                 The argument 'tree'  is  a  string  that  will  receive  the
                 equivalent  Primos  treename.   The  function  return is the
                 length of the treename returned in 'tree'.

                 The pathname may begin with a series of  backslashes  ("\"),
                 each  of which indicates a one-level ascension in the direc-
                 tory hierarchy.  For example, the  pathname  "\"  means  the
                 directory  which is the parent of the current directory, and
                 "\\file2" means the file named "file2" in the grandparent of
                 the current directory.

                 Slashes in the input pathname that are preceded  by  an  at-
                 sign  ("@")  are  passed  through to the treename unchanged;
                 they are not interpreted as separator characters.

                 Multiple slashes (except at the beginning of the  path)  are
                 ignored.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 The  first  characters in the pathname determine the initial
                 portion of the treename.  If there are two leading  slashes,
                 then  the  treename begins with "mfd".  If there is only one
                 leading  slash,  then  a  packname  was  specified  and  the
                 treename  begins with "<packname>mfd".  If there are leading
                 backslashes, then the Primos routine GPATH$ is called to get
                 the name of the current directory, and the appropriate  por-
                 tion  becomes  the  start of the treename.  The remainder of
                 the conversion consists mostly of substituting  slashes  for
                 greater-than signs and handling escape sequences.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 tree


            _C_a_l_l_s

                 scopy, Primos gpath$, ptoc, mapstr




            mktr$ (6)                     - 1 -                     mktr$ (6)




            mktr$ (6) --- convert a pathname into a treename         03/25/82


            _S_e_e _A_l_s_o

                 mkpa$ (6), follow (2), getto (2)























































            mktr$ (6)                     - 2 -                     mktr$ (6)


