cof$ (6) --- close files opened by the last user program 03/25/82 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n subroutine cof$ (state) integer state (MAXFILESTATE) Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n When called, 'cof$' closes all open files that were opened after the last call to 'iofl$'. 'Cof$' also resets the terminal input buffer pointer and character count in the Subsystem common block. _I_m_p_l_e_m_e_n_t_a_t_i_o_n 'Cof$' checks the flag word of each of the file descriptors in 'state' up to the ERR marker. If the file is currently open, 'cof$' calls 'close' to close it. Next, 'cof$' skips the ERR marker, and calls the Primos routine SRCH$$ to close all of the Primos files indicated by the second list in 'state' (up to the next ERR marker). Lastly, 'cof$' resets the terminal input buffer pointer to 1 and the terminal buffer character count to 0. _C_a_l_l_s close, Primos srch$$ _S_e_e _A_l_s_o iofl$ (6), close (2), open (2) cof$ (6) - 1 - cof$ (6)