

            upkfn$ (6) --- unpack a Primos file name; escape slashes  01/06/83


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function upkfn$ (name, len, str, max)
                 packed_char name (ARB)
                 integer len, max
                 character str (ARB)

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Upkfn$' operates on the packed Primos file name or password
                 of  length  'len'  in  'name'.   It  converts  it to an EOS-
                 terminated string in 'str' by unpacking it and  placing  the
                 escape  character  ("@") in front of all slashes.  Thus, the
                 name in 'str' is acceptable to all Subsystem routines expec-
                 ting a file or path name.

                 The function value is the number  of  characters  placed  in
                 'str'.  In no case will more than 'max' elements of 'str' be
                 disturbed.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Upkfn$'  uses  the Subsystem macro 'fpchar' to take succes-
                 sive characters from the packed  name.   Each  character  is
                 copied  into  the  receiving  string  (preceded by an escape
                 character, if it is a slash) after  being  mapped  to  lower
                 case  until  the  string  is  full or the end of the name is
                 reached.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 str


            _C_a_l_l_s

                 mapdn


            _S_e_e _A_l_s_o

                 follow (2), getto (2), open (2), ptoc (2)











            upkfn$ (6)                    - 1 -                    upkfn$ (6)


