1function dyn_waitbar_close(h)
2% h = dyn_waitbar_close(h)
3% adaptive close waitbar, compatible with
4% octave and when console_mode=1
5
6%
7% Copyright (C) 2011-2017 Dynare Team
8%
9% This file is part of Dynare.
10%
11% Dynare is free software: you can redistribute it and/or modify
12% it under the terms of the GNU General Public License as published by
13% the Free Software Foundation, either version 3 of the License, or
14% (at your option) any later version.
15%
16% Dynare is distributed in the hope that it will be useful,
17% but WITHOUT ANY WARRANTY; without even the implied warranty of
18% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19% GNU General Public License for more details.
20%
21% You should have received a copy of the GNU General Public License
22% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
23global options_
24
25if isoctave || options_.console_mode
26    clear dyn_waitbar;
27    diary on
28    fprintf('\n');
29else
30    close(h)
31end
32
33clear dyn_waitbar;
34