]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MINICERN/packlib/kernlib/kerngen/tcgen/sungs/ffsize.F
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kerngen / tcgen / sungs / ffsize.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.2  1996/04/02 23:16:08  thakulin
6 * Add support for Apogee Fortran.
7 *
8 * Revision 1.1.1.1  1996/02/15 17:49:58  mclareni
9 * Kernlib
10 *
11 *
12       SUBROUTINE FFSIZE (LUN,NWREC,JREC,ISTAT)
13
14 C-    Get the size of a disk file connected to Fortran unit LUN
15
16 #ifdef CERNLIB_QFAPOGEE
17
18 C-    This is the method we have to use for Apogee compilers
19
20       INTEGER APOFSZ
21
22       INQUIRE(UNIT=LUN,NAME=FNAME)
23       ISTAT = APOFSZ(FNAME,NBYTES)
24       IF (ISTAT.NE.0) RETURN
25 #else
26       INTEGER      FSEEK, FTELL
27
28       ISTAT = FSEEK (LUN, 0, 2)
29       IF (ISTAT.NE.0)              RETURN
30
31       NBYTES = FTELL (LUN)
32 #endif
33       IF (NBYTES.LT.0)  THEN
34           ISTAT = -NBYTES
35           RETURN
36         ENDIF
37
38       NWORDS = NBYTES / 4
39       JREC   = NWORDS / NWREC
40       RETURN
41       END