

            iofl$ (6) --- initialize open file list                  03/25/82


            _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

                 subroutine iofl$ (state)
                 integer state (MAXFILESTATE)

                 Library:  vswtlb (standard Subsystem library)


            _F_u_n_c_t_i_o_n

                 'Iofl$'  saves  the  Subsystem  and  Primos file descriptors
                 which correspond to closed files in 'state',  so  that  sub-
                 sequently opened files can be closed by 'cof$'.


            _I_m_p_l_e_m_e_n_t_a_t_i_o_n

                 For each Subsystem file descriptor, 'iofl$' examines the its
                 flag  word  to  determine  if it is closed.  For each closed
                 file, its descriptor is saved in 'state'.   After  the  last
                 closed  Subsystem  file descriptor entered into 'state', ERR
                 is entered into 'state' to mark the end of the list.

                 Next, for each Primos file  descriptor,  'iofl$'  calls  the
                 Primos  routine  PRWF$$  to  test whether or not the file is
                 open and valid.   For  each  valid  closed  file,  its  file
                 descriptor  is  entered  into 'state'.  After the last valid
                 closed Primos file  descriptor  has  been  entered,  ERR  is
                 entered into 'state' to mark the end of the list.


            _C_a_l_l_s

                 Primos prwf$$


            _S_e_e _A_l_s_o

                 cof$ (6)



















            iofl$ (6)                     - 1 -                     iofl$ (6)


