]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | * |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.1.1.1 1995/10/24 10:20:11 cernlib | |
6 | * Geant | |
7 | * | |
8 | * | |
9 | #include "geant321/pilot.h" | |
10 | *CMZ : 3.21/02 29/03/94 15.41.19 by S.Giani | |
11 | *-- Author : | |
12 | SUBROUTINE GWORK(NWORK) | |
13 | C. | |
14 | C. ****************************************************************** | |
15 | C. * * | |
16 | C. * Handle working space. * | |
17 | C. * * | |
18 | C. * If NWORK>0 make sure that at least NWORK words of working * | |
19 | C. * space are available in the GCBANK common. If current * | |
20 | C. * working space is >= NWORK, do nothing. * | |
21 | C. * * | |
22 | C. * If NWORK=0 return in NWORK the current size of the * | |
23 | C. * working space. * | |
24 | C. * * | |
25 | C. * If NWORK<0 reset the working space to be NWORK words * | |
26 | C. * irrespective of its value. * | |
27 | C. * * | |
28 | C. * ==>Called by :USER,GZINIT,GPHYSI,GDRAWC,GDRAWX,GDSHOW,GKXYZ * | |
29 | C. * * | |
30 | C. * Author R.Brun ********* * | |
31 | C. * * | |
32 | C. ****************************************************************** | |
33 | C. | |
34 | #include "geant321/gcbank.inc" | |
35 | #if defined(CERNLIB_DEBUG) | |
36 | #include "geant321/gcunit.inc" | |
37 | #endif | |
38 | COMMON / QUEST / IQUEST(100) | |
39 | C. | |
40 | C. ------------------------------------------------------------------ | |
41 | C. | |
42 | IF(NWORK.GE.0) THEN | |
43 | CALL MZINQS(IXSTOR) | |
44 | NOWORK = IQUEST(5)-IQUEST(3)-1 | |
45 | #if defined(CERNLIB_DEBUG) | |
46 | WRITE(CHMAIL, | |
47 | + '('' *** GWORK: Size of the working space = '',I10)') NOWORK | |
48 | CALL GMAIL(0,0) | |
49 | #endif | |
50 | IF(NWORK.EQ.0) THEN | |
51 | NWORK=NOWORK | |
52 | ELSE | |
53 | IF(NWORK.GT.NOWORK) THEN | |
54 | CALL MZWORK(IXSTOR,WS,WS(NWORK),0) | |
55 | ENDIF | |
56 | ENDIF | |
57 | ELSE | |
58 | CALL MZWORK(IXSTOR,WS,WS(-NWORK),0) | |
59 | ENDIF | |
60 | END |