]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MINICERN/packlib/kernlib/kerngen/tcgen/sgigs/ffsize.F
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kerngen / tcgen / sgigs / ffsize.F
diff --git a/MINICERN/packlib/kernlib/kerngen/tcgen/sgigs/ffsize.F b/MINICERN/packlib/kernlib/kerngen/tcgen/sgigs/ffsize.F
new file mode 100644 (file)
index 0000000..6ed61e7
--- /dev/null
@@ -0,0 +1,27 @@
+*
+* $Id$
+*
+* $Log$
+* Revision 1.1.1.1  1996/02/15 17:49:58  mclareni
+* Kernlib
+*
+*
+      SUBROUTINE FFSIZE (LUN,NWREC,JREC,ISTAT)
+
+C-    Get the size of a disk file connected to Fortran unit LUN
+
+      INTEGER      FSEEK, FTELL
+
+      ISTAT = FSEEK (LUN, 0, 2)
+      IF (ISTAT.NE.0)              RETURN
+
+      NBYTES = FTELL (LUN)
+      IF (NBYTES.LT.0)  THEN
+          ISTAT = -NBYTES
+          RETURN
+        ENDIF
+
+      NWORDS = NBYTES / 4
+      JREC   = NWORDS / NWREC
+      RETURN
+      END