/*+ * COUNT copen(unit, file) * COUNT unit; * TEXT *file; * * Description : This routine is used to simulate open/old fortran routine. * * Arguments : unit = unit number to close * file = file name to be opened. * * Returns : >= 0 if successful * -1 or RT11 error or'd with 0400 if failed * * Author : J.W. Gatschuff * Atomic Energy of Canada * Whiteshell Nuclear Research Est. * Pinawa, Manitoba, Canada * branch: Technical Services * * Version : V1.0 Date : 22-OCT-85 * * Module name : copen.c * * Package : TRAMPC * * Updates : name version * * description : -*/ #include #include COUNT copen(unit, file) COUNT unit; TEXT *file; { IMPORT FIO fortio[NFCHNL]; --unit; if((fortio[unit]._fd = open(file, UPDATE, 0)) < 0) return(fortio[unit]._fd); /* Open as Binary File */ finit(&fortio[unit], fortio[unit]._fd, UPDATE); return(fortio[unit]._fd); }