

            tgetl$ (6) --- read a line from the terminal             03/25/82


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 integer function tgetl$ (buf, size, f)
                 character buf (ARB)
                 integer size
                 file_des f

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Tgetl$'  is  the device-dependent driver for terminal line-
                 image i/o.  The first argument is a string  to  receive  the
                 line  read;  the  second  argument  is the maximum number of
                 characters to be placed in the string; the third argument is
                 the file descriptor of a terminal file.  The function return
                 is either zero (when EOF is detected) or the length  of  the
                 string read in.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 'Tgetl$'  first  checks  to  see  if  the terminal buffer is
                 empty.  If it is, then 'tcook$'  is  called  to  refill  the
                 buffer.  The characters in the terminal buffer are copied to
                 the  user  buffer  'buf' until either 'size' characters have
                 been copied or the terminal buffer has been exhausted.   The
                 return  value  is  the number of characters that were copied
                 into 'buf'.


            _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d

                 buf


            _C_a_l_l_s

                 tcook$


            _S_e_e _A_l_s_o

                 getlin (2), tputl$ (6), tcook$ (6)













            tgetl$ (6)                    - 1 -                    tgetl$ (6)


