00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "kerngen/pilot.h"
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "kerngen/cf_seek.h"
00036 #include "kerngen/cf_xaft.h"
00037 #include "kerngen/wordsizc.h"
00038 #include "kerngen/fortranc.h"
00039 #include "stdio.h"
00040
00041 #if defined(CERNLIB_QX_SC)
00042 void type_of_call cfseek_(lundes, medium, nwrec, jcrec, stat)
00043 #endif
00044 #if defined(CERNLIB_QXNO_SC)
00045 void type_of_call cfseek(lundes, medium, nwrec, jcrec, stat)
00046 #endif
00047 #if defined(CERNLIB_QXCAPT)
00048 void type_of_call CFSEEK(lundes, medium, nwrec, jcrec, stat)
00049 #endif
00050 int *lundes, *medium, *nwrec, *jcrec, *stat;
00051 {
00052 int fildes;
00053 int nbdo;
00054 int isw;
00055
00056
00057
00058 fildes = *lundes;
00059 nbdo = *jcrec * *nwrec * NBYTPW;
00060 isw = lseek (fildes, nbdo, 0);
00061 if (isw < 0) goto trouble;
00062 *stat = 0;
00063 return;
00064
00065 trouble: *stat = -1;
00066 perror (" error in CFSEEK");
00067 return;
00068 }
00069
00070 #ifdef CERNLIB_TCGEN_CFSEEK
00071 #undef CERNLIB_TCGEN_CFSEEK
00072 #endif