5 * Revision 1.4 1997/09/02 14:26:50 mclareni
8 * Revision 1.3 1997/02/04 17:35:17 mclareni
9 * Merge Winnt and 97a versions
11 * Revision 1.2 1997/01/15 16:25:44 cernlib
12 * fix from F.Hemmer to return rfio return code
14 * Revision 1.1.1.1.2.1 1997/01/21 11:30:17 mclareni
15 * All mods for Winnt 96a on winnt branch
17 * Revision 1.1.1.1 1996/02/15 17:49:37 mclareni
21 #include "kerngen/pilot.h"
22 #include "kerngen/fortranc.h"
25 CERN PROGLIB# Z311 CIGETW .VERSION KERNFOR 4.31 911111
27 CALL CIGETW (LUNDES, MBUF, NWDO, NWDONE, ISTAT)
29 LUNDES file descriptor
30 *MBUF vector to be read into
31 NWDO number of full words to be read
32 *NWDONE number of full words actually read
33 *ISTAT status, =zero if success
35 #include "kerngen/cf_reaw.h"
41 #include "kerngen/cf_xaft.h"
42 #include "kerngen/wordsizc.h"
43 #if defined(CERNLIB_QX_SC)
44 void type_of_call cigetw_(lundes, mbuf, nwdo, nwdone, stat)
46 #if defined(CERNLIB_QXNO_SC)
47 void type_of_call cigetw(lundes, mbuf, nwdo, nwdone, stat)
49 #if defined(CERNLIB_QXCAPT)
50 void type_of_call CIGETW(lundes, mbuf, nwdo, nwdone, stat)
53 int *lundes, *nwdo, *nwdone, *stat;
59 if (*nwdo <= 0) return;
64 nbxq = *nwdo * NBYTPW;
65 nbdn = read (fildes, mbuf, nbxq);
66 if (nbdn == 0) goto heof;
67 if (nbdn < 0) goto herror;
68 *nwdone = nbdn / NBYTPW;
71 /* Handle exceptions */
76 #if defined(CERNLIB_PROJSHIFT)
77 herror: *stat = (serrno ? serrno : (rfio_errno ? rfio_errno : errno));
79 herror: *stat = errno;
81 perror (" error in CIGETW");
84 /*> END <----------------------------------------------------------*/