]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MINICERN/packlib/kernlib/kerngen/ccgenci/ciseek.c
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kerngen / ccgenci / ciseek.c
1 /*
2  * $Id$
3  *
4  * $Log$
5  * Revision 1.2  1997/02/04 17:35:21  mclareni
6  * Merge Winnt and 97a versions
7  *
8  * Revision 1.1.1.1.2.1  1997/01/21 11:30:20  mclareni
9  * All mods for Winnt 96a on winnt branch
10  *
11  * Revision 1.1.1.1  1996/02/15 17:49:39  mclareni
12  * Kernlib
13  *
14  */
15 #include "kerngen/pilot.h"
16 #include "kerngen/fortranc.h"
17
18 /*>    ROUTINE CISEEK
19   CERN PROGLIB# Z311    CISEEK          .VERSION KERNFOR  4.31  911111
20   ORIG. 12/10/91, JZ
21       CALL CISEEK (LUNDES, JCBYT, ISTAT)
22       reposition the file :
23        LUNDES  file descriptor
24        JCBYT   number of bytes before current
25       *ISTAT   status, =zero if success
26 */
27 #include "kerngen/cf_seek.h"
28 #include "kerngen/cf_xaft.h"
29 #if defined(CERNLIB_QX_SC)
30 void type_of_call ciseek_(lundes, jcbyt, stat)
31 #endif
32 #if defined(CERNLIB_QXNO_SC)
33 void type_of_call ciseek(lundes, jcbyt, stat)
34 #endif
35 #if defined(CERNLIB_QXCAPT)
36 void type_of_call CISEEK(lundes, jcbyt, stat)
37 #endif
38       int  *lundes, *jcbyt, *stat;
39 {
40       int  fildes;
41       int  nbdo;
42       int  isw;
43
44 /*        position the file        */
45
46       fildes = *lundes;
47       nbdo   = *jcbyt;
48       isw    = lseek (fildes, nbdo, 0);
49       if (isw <  0)                goto trouble;
50       *stat = 0;
51       return;
52
53 trouble:  *stat = -1;
54           perror (" error in CISEEK");
55           return;
56 }
57 /*> END <----------------------------------------------------------*/