Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / GEANT321 / giopa / gclose.F
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1995/10/24 10:21:16 cernlib
6* Geant
7*
8*
9#include "geant321/pilot.h"
10*CMZ : 3.21/02 29/03/94 15.41.20 by S.Giani
11*-- Author :
12 SUBROUTINE GCLOSE (LUN,IER)
13C.
14C. ******************************************************************
15C. * *
16C. * Routine to close I/O units *
17C. * *
18C. * LUN Logical unit number *
19C. * IER error flag *
20C. * *
21C. * ==>Called by : <USER>, UGLAST *
22C. * Authors R.Brun, F.Carena ********* *
23C. * *
24C. ******************************************************************
25C.
26#include "geant321/gcunit.inc"
27C.
28C. ------------------------------------------------------------------
29C.
30 IER=0
31 IF(LUN.EQ.0)THEN
32 CALL FZENDO(LUN,'T')
33 CALL FZENDI(LUN,'T')
34 ELSE
35 DO 10 I=1,NUNITS
36 IF(LUN.EQ.ABS(LUNITS(I)))THEN
37 IF(LUNITS(I).LT.0)THEN
38 CALL FZENDI(LUN,'T')
39 ELSE
40 CALL FZENDO(LUN,'T')
41 ENDIF
42 LUNITS(I)=0
43 GOTO 999
44 ENDIF
45 10 CONTINUE
46 IER=1
47 ENDIF
48 999 END