5 * Revision 1.4 1997/10/23 16:33:19 mclareni
8 * Revision 1.3 1997/02/04 17:35:12 mclareni
9 * Merge Winnt and 97a versions
11 * Revision 1.2 1997/01/15 16:25:33 cernlib
12 * fix from F.Hemmer to return rfio return code
14 * Revision 1.1.1.1.2.1 1997/01/21 11:30:11 mclareni
15 * All mods for Winnt 96a on winnt branch
17 * Revision 1.1.1.1 1996/02/15 17:49:36 mclareni
21 #include "kerngen/pilot.h"
22 #include "kerngen/fortranc.h"
25 CERN PROGLIB# Z310 CFPUT .VERSION KERNFOR 4.29 910718
27 CALL CFPUT (LUNDES, MEDIUM, NWREC, MBUF, ISTAT)
29 LUNDES file descriptor
30 MEDIUM = 0,1,2,3 : primary disk/tape, secondary disk/tape
31 NWREC record size, number of words to be written
32 MBUF vector to be written
33 *ISTAT status, =zero if success
35 #include "kerngen/cf_reaw.h"
37 #include "kerngen/cf_xaft.h"
38 #include "kerngen/wordsizc.h"
39 #if defined(CERNLIB_QX_SC)
40 void type_of_call cfput_(lundes, medium, nwrec, mbuf, stat)
42 #if defined(CERNLIB_QXNO_SC)
43 void type_of_call cfput(lundes, medium, nwrec, mbuf, stat)
45 #if defined(CERNLIB_QXCAPT)
46 void type_of_call CFPUT(lundes, medium, nwrec, mbuf,
47 # ifdef CERNLIB_CFPUT_CHARACTER
51 # ifdef CERNLIB_CFPUT_CHARACTER
56 int *lundes, *medium, *nwrec, *stat;
62 if (*nwrec <= 0) return;
67 nbdo = *nwrec * NBYTPW;
68 nbdn = write (fildes, mbuf, nbdo);
69 if (nbdn < 0) goto trouble;
72 #if defined(CERNLIB_PROJSHIFT)
73 trouble: *stat = (serrno ? serrno : (rfio_errno ? rfio_errno : errno));
75 trouble: *stat = errno;
77 perror (" error in CFPUT");
80 /*> END <----------------------------------------------------------*/
81 #ifdef CERNLIB_TCGEN_CFPUT
82 #undef CERNLIB_TCGEN_CFPUT