Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

cfput.c File Reference

#include "kerngen/pilot.h"
#include "kerngen/fortranc.h"
#include "stdio.h"
#include "kerngen/cf_reaw.h"
#include <errno.h>
#include "kerngen/cf_xaft.h"
#include "kerngen/wordsizc.h"

Go to the source code of this file.

Functions

void type_of_call cfput_ (int *lundes, int *medium, int *nwrec, char *mbuf, int *stat)


Function Documentation

void type_of_call cfput_ int *  lundes,
int *  medium,
int *  nwrec,
char *  mbuf,
int *  stat
 

Definition at line 49 of file cfput.c.

References type_of_call.

00066 {
00067       int  fildes;
00068       int  nbdn, nbdo;
00069 
00070       *stat = 0;
00071       if (*nwrec <= 0)            return;
00072 
00073 /*        write the file     */
00074 
00075       fildes = *lundes;
00076       nbdo   = *nwrec * NBYTPW;
00077       nbdn   = write (fildes, mbuf, nbdo);
00078       if (nbdn < 0)               goto trouble;
00079       return;
00080 
00081 #if defined(CERNLIB_PROJSHIFT)
00082 trouble:  *stat = (serrno ? serrno : (rfio_errno ? rfio_errno : errno));
00083 #else
00084 trouble:  *stat = errno;
00085 #endif
00086           perror (" error in CFPUT");
00087           return;
00088 }


Generated on Mon Feb 15 11:07:55 2010 for loon by  doxygen 1.3.9.1