

            ctoc (2) --- convert EOS-terminated string to EOS-terminated string  03/23/80


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function ctoc (from, to, len)
                 integer len
                 character from (ARB), to (len)

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Ctoc'  copies  an  EOS-terminated  unpacked string from one
                 array to another, observing a maximum-length  constraint  on
                 the destination array.  The function return is the number of
                 characters  copied  (i.e.,  the  length of the string in the
                 parameter 'to').

                 Note that the other string copy  routine,  'scopy',  is  not
                 protected;  if  the  length of the source string exceeds the
                 space available in the destination string, some  portion  of
                 memory will be garbled.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 A simple loop copies characters from 'from' to 'to' until an
                 EOS  is  encountered  or  all  the  space  available  in the
                 destination array is used up.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 to


            _S_e_e _A_l_s_o

                 scopy (2), other conversion routines ('cto?*'  and  '?*toc')
                 (2)



















            ctoc (2)                      - 1 -                      ctoc (2)


