

            ctomn (2) --- translate ASCII control character to mnemonic  03/28/80


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function ctomn (c, rep)
                 character c, rep (4)

                 Library:  vswtlb  (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Ctomn' is used to convert an unprintable ASCII character to
                 its  official  ASCII  mnemonic.   The  first argument is the
                 character to be converted; the second is a string to receive
                 the mnemonic.  The function return  is  the  length  of  the
                 string placed in the second argument.

                 If  the  character passed is printable, it is copied through
                 unchanged to the receiving string.   If  not,  its  two-  or
                 three-character  ASCII  mnemonic  (e.g.  NUL, SOH, etc.)  is
                 copied into the receiving string.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 If the character is printable, it is placed in the receiving
                 string, which is then terminated with EOS.  If the character
                 is between 128 and 160, inclusive, or equals 255, its  value
                 is  used  to compute an index into a string table containing
                 the mnemonics.  The mnemonic thus selected  is  copied  into
                 the receiving string.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 rep


            _C_a_l_l_s

                 scopy


            _S_e_e _A_l_s_o

                 mntoc (2)













            ctomn (2)                     - 1 -                     ctomn (2)


