

            lsputc (4) --- put character into a linked string        02/23/82


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 character function lsputc (ptr, c)
                 pointer ptr
                 character c

                 Library:  vlslb


            _F_u_n_c_t_i_o_n

                 The  character  in 'c' is placed in the next position of the
                 string specified by 'ptr'.  'Ptr' is then updated  to  point
                 to  the  next available position.  The function value is the
                 value of 'c', unless there is no more room  in  the  string.
                 In  this  case,  EOS  is  returned  and  the  pointer is not
                 updated.  If an EOS is put in the string before the end, the
                 remaining character positions are deallocated.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 Pointers in the string are followed  until  a  character  is
                 found.   If  the character is not EOS, it is replaced by the
                 value of 'c' and 'ptr' is incremented.  If the value of  'c'
                 is  EOS,  'lsfree'  is  called to deallocate the rest of the
                 string.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 ptr, c


            _C_a_l_l_s

                 lsfree


            _B_u_g_s

                 'Lsputc' should perhaps allocate more space if the receiving
                 string overflows.

                 Locally supported.


            _S_e_e _A_l_s_o

                 lsgetc (4)








            lsputc (4)                    - 1 -                    lsputc (4)


