fcopy (2) --- copy one file to another 01/07/83 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n subroutine fcopy (in, out) file_des in, out Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n 'Fcopy' is a routine that copies the contents of one file to another. The two arguments specify the file descriptors of the source and destination files, respectively. Both files must be open with the proper access modes (i.e., READ or READWRITE access for the source, and WRITE or READWRITE access for the destination); neither is rewound before or after the copy. _I_m_p_l_e_m_e_n_t_a_t_i_o_n 'Fcopy's strategy depends on the types of devices represented by the source and destination files; if both are disk files, the routines 'readf' and 'writef' are called repeatedly to transfer large blocks of data. For all other combinations of source and destination device types, 'get- lin' and 'putlin' are called repeatedly to transfer one line at a time. Even for disk files, 'getlin' may be called, to insure that the buffer state is consistent. _C_a_l_l_s getlin, mapsu, putlin, readf, writef _B_u_g_s There is no provision for an error return of any sort; no status is passed back to the calling program to indicate success or failure of the copy. _S_e_e _A_l_s_o getlin (2), putlin (2), readf (2), writef (2) fcopy (2) - 1 - fcopy (2)