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

cfseek.c

Go to the documentation of this file.
00001 /*
00002  * $Id: cfseek.c,v 1.2 2009/02/16 08:04:36 schubert Exp $
00003  *
00004  * Revision 1.1.1.1  2002/07/24 15:56:27  rdm
00005  * initial import into CVS
00006  *
00007  * Revision 1.1.1.1  2002/06/16 15:18:46  hristov
00008  * Separate distribution  of Geant3
00009  *
00010  * Revision 1.1.1.1  1999/05/18 15:55:29  fca
00011  * AliRoot sources
00012  *
00013  * Revision 1.2  1997/02/04 17:35:13  mclareni
00014  * Merge Winnt and 97a versions
00015  *
00016  * Revision 1.1.1.1.2.1  1997/01/21 11:30:12  mclareni
00017  * All mods for Winnt 96a on winnt branch
00018  *
00019  * Revision 1.1.1.1  1996/02/15 17:49:36  mclareni
00020  * Kernlib
00021  *
00022  */
00023 #include "kerngen/pilot.h"
00024 /*>    ROUTINE CFSEEK
00025   CERN PROGLIB# Z310    CFSEEK          .VERSION KERNFOR  4.29  910718
00026   ORIG. 12/01/91, JZ
00027       CALL CFSEEK (LUNDES, MEDIUM, NWREC, JCREC, ISTAT)
00028       reposition the file :
00029        LUNDES  file descriptor
00030        MEDIUM  = 0,1,2,3 : primary disk/tape, secondary disk/tape
00031        NWREC   number of words per record
00032        JCREC   number of records before current
00033       *ISTAT   status, =zero if success
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 /*        position the file        */
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 /*> END <----------------------------------------------------------*/
00070 #ifdef CERNLIB_TCGEN_CFSEEK
00071 #undef CERNLIB_TCGEN_CFSEEK
00072 #endif

Generated on Mon Feb 15 11:06:31 2010 for loon by  doxygen 1.3.9.1