11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
36 use dc_trace, only: beginsub, endsub, dbgmessage
37 use dc_string, only: putline, printf, split, strinclude, stoa, joinchar
40 implicit none
41 type(GTHST_NMLINFO), intent(inout):: gthstnml
42 logical, intent(out), optional:: err
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60 type(GTHST_NMLINFO_ENTRY), pointer:: hptr =>null()
61 type(GTHST_NMLINFO_ENTRY), pointer:: hptr_prev =>null()
62 integer:: stat
63 character(STRING):: cause_c
64 character(*), parameter:: subname = 'HstNmlInfoClose'
65 continue
66 call beginsub( subname )
68 cause_c = ''
69
70
71
72
73
74 if ( .not. gthstnml % initialized ) then
76 cause_c = 'GTHST_NMLINFO'
77 goto 999
78 end if
79
80
81
82
83
84 do
85 hptr => gthstnml % gthstnml_list
86 call listlast( gthstnml_list = hptr, &
87 & previous = hptr_prev )
88 call dbgmessage( 'remove entry (%c)', c1 = trim(hptr % name) )
89 if ( trim( hptr % name ) == '' ) exit
90 if ( .not. gthstnml % define_mode ) then
91 if ( historyinitialized( hptr % history ) ) then
93 cause_c = hptr % name
94 goto 999
95 end if
96 end if
97 deallocate( hptr )
98 nullify( hptr_prev % next )
99 end do
100 deallocate( gthstnml % gthstnml_list )
101
102
103
104
105
106 gthstnml % initialized = .false.
107 gthstnml % define_mode = .true.
108999 continue
109 nullify( hptr )
110 call storeerror( stat, subname, err, cause_c )
111 call endsub( subname )
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public hst_enottermgthist
integer, parameter, public dc_enotinit
integer, parameter, public dc_noerr
Provides kind type parameter values.
integer, parameter, public stdout
Unit number for Standard OUTPUT
integer, parameter, public token
Character length for word, token
integer, parameter, public dp
Double Precision Real number
integer, parameter, public string
Character length for string