

            mntoc (2) --- convert ASCII mnemonic to character        03/28/80


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 character function mntoc (buf, p, default)
                 character buf (ARB), default
                 integer p

                 Library:  vswtlb  (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Mntoc'  is  used to convert a standard ASCII mnemonic (e.g.
                 ACK, BEL, BS) into an ASCII character  code.   The  argument
                 'buf' is an EOS-terminated string presumed to contain either
                 a  single  character  or  a  two-  or  three-character ASCII
                 mnemonic (in either upper or lower case), starting at  posi-
                 tion 'p'.  The function return depends on the outcome of the
                 conversion  as  follows:   (1)  if  'buf'  contains only one
                 character, the function return is equivalent to that charac-
                 ter; (2) if 'buf' contains an ASCII mnemonic terminated by a
                 nonalphanumeric  character,  the  function  return  is   the
                 character code associated with that mnemonic; (3) otherwise,
                 the function return is equivalent to the character specified
                 as  the  third  argument  ('default').  In all cases, 'p' is
                 advanced to the first character beyond the presumed mnemonic
                 or single character.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 The mnemonic is transferred to an internal character buffer,
                 then used in a binary search of a  string  table  containing
                 the ASCII mnemonics.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 p


            _C_a_l_l_s

                 mapstr, strbsr


            _S_e_e _A_l_s_o

                 ctomn










            mntoc (2)                     - 1 -                     mntoc (2)


