/*+ * COUNT ccreat(unit, file) * COUNT unit; * TEXT *file; * * Description : This routine is used to simulate open/new fortran routine. * If file already exists, it is predeleted. * * 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 : ccreat.c * * Package : TRAMPC * * Updates : name version * * description : -*/ #include #include COUNT ccreat(unit, file) COUNT unit; TEXT *file; { IMPORT FIO fortio[NFCHNL]; --unit; if((fortio[unit]._fd = create(file, UPDATE, 0)) < 0) return(fortio[unit]._fd); /* Open as Binary File */ finit(&fortio[unit], fortio[unit]._fd, UPDATE); return(fortio[unit]._fd); }