From fd5dc8c14a809de1648cd797f69db757aef7093c Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Thu, 23 Jan 2014 17:46:35 -0600
Subject: [PATCH] reporting: print less to screen by default

---
 matlab/reports/@graph/createGraph.m   | 5 +++--
 matlab/reports/@pages/addPage.m       | 4 ++--
 matlab/reports/@pages/write.m         | 4 ++--
 matlab/reports/@report_table/write.m  | 1 +
 matlab/reports/@section/addGraph.m    | 4 ++--
 matlab/reports/@section/addTable.m    | 4 ++--
 matlab/reports/@section/addVspace.m   | 4 ++--
 matlab/reports/@section/write.m       | 5 ++---
 matlab/reports/@sections/addSection.m | 4 ++--
 matlab/reports/@sections/write.m      | 3 +--
 matlab/reports/@vspace/write.m        | 3 ++-
 11 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/matlab/reports/@graph/createGraph.m b/matlab/reports/@graph/createGraph.m
index 8b9c6ca8c0..d1d3b95603 100644
--- a/matlab/reports/@graph/createGraph.m
+++ b/matlab/reports/@graph/createGraph.m
@@ -11,7 +11,7 @@ function o = createGraph(o)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -142,7 +142,7 @@ if isempty(o.figname)
     end
     o.figname = [o.figDirName '/' tn '.tex'];
 end
-disp('  converting to tex....');
+
 if isoctave && isempty(regexpi(computer, '.*apple.*', 'once'))
     print(o.figname, '-dtikz');
 else
@@ -157,4 +157,5 @@ box off;
 hold off;
 close(h);
 clear h;
+fprintf(1, '.');
 end
diff --git a/matlab/reports/@pages/addPage.m b/matlab/reports/@pages/addPage.m
index 00d154a1f1..799a92cfbd 100644
--- a/matlab/reports/@pages/addPage.m
+++ b/matlab/reports/@pages/addPage.m
@@ -12,7 +12,7 @@ function o = addPage(o, varargin)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -29,6 +29,6 @@ function o = addPage(o, varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
-disp(['Processing Page: ' num2str(numPages(o)+1)]);
+fprintf(1, '\nAdding Page: %d', numPages(o)+1);
 o.objArray = o.objArray.addObj(page(varargin{:}));
 end
\ No newline at end of file
diff --git a/matlab/reports/@pages/write.m b/matlab/reports/@pages/write.m
index 203060495e..7d211e642c 100644
--- a/matlab/reports/@pages/write.m
+++ b/matlab/reports/@pages/write.m
@@ -12,7 +12,7 @@ function o = write(o, fid)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -33,7 +33,7 @@ assert(fid ~= -1);
 fprintf(fid, '\n%% Pages Object\n');
 nps = numPages(o);
 for i=1:nps
-    disp(['Writing Page: ' num2str(i)]);
+    fprintf(1, '\nWriting Page: %d', i);
     o.objArray(i).write(fid);
 end
 fprintf(fid, '%% End Pages Object\n\n');
diff --git a/matlab/reports/@report_table/write.m b/matlab/reports/@report_table/write.m
index d16288d62e..4d74bb462b 100644
--- a/matlab/reports/@report_table/write.m
+++ b/matlab/reports/@report_table/write.m
@@ -158,4 +158,5 @@ end
 fprintf(fid, '\\bottomrule\n');
 fprintf(fid, '\\end{tabular} \\par \\medskip\n\n');
 fprintf(fid, '%% End Report_Table Object\n');
+fprintf(1, '.');
 end
diff --git a/matlab/reports/@section/addGraph.m b/matlab/reports/@section/addGraph.m
index b8e3c03f2a..46e2bdc4a8 100644
--- a/matlab/reports/@section/addGraph.m
+++ b/matlab/reports/@section/addGraph.m
@@ -13,7 +13,7 @@ function o = addGraph(o, varargin)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -30,6 +30,6 @@ function o = addGraph(o, varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
-disp(['Processing Section Element: ' num2str(numElements(o)+1)]);
+fprintf(1, '.');
 o.elements = o.elements.addGraph(varargin{:});
 end
diff --git a/matlab/reports/@section/addTable.m b/matlab/reports/@section/addTable.m
index 831ff70032..f3098e627c 100644
--- a/matlab/reports/@section/addTable.m
+++ b/matlab/reports/@section/addTable.m
@@ -13,7 +13,7 @@ function o = addTable(o, varargin)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -30,6 +30,6 @@ function o = addTable(o, varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
-disp(['Processing Section Element: ' num2str(numElements(o)+1)]);
+fprintf(1, '.');
 o.elements = o.elements.addTable(varargin{:});
 end
diff --git a/matlab/reports/@section/addVspace.m b/matlab/reports/@section/addVspace.m
index 43ca6ac671..8b9ae08630 100644
--- a/matlab/reports/@section/addVspace.m
+++ b/matlab/reports/@section/addVspace.m
@@ -12,7 +12,7 @@ function o = addVspace(o, varargin)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -29,6 +29,6 @@ function o = addVspace(o, varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
-disp(['Processing Section Element: ' num2str(numElements(o)+1)]);
+fprintf(1, '.');
 o.elements = o.elements.addVspace(varargin{:});
 end
diff --git a/matlab/reports/@section/write.m b/matlab/reports/@section/write.m
index b80a5fd0cb..3478371d46 100644
--- a/matlab/reports/@section/write.m
+++ b/matlab/reports/@section/write.m
@@ -12,7 +12,7 @@ function o = write(o, fid)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -30,7 +30,7 @@ function o = write(o, fid)
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 assert(fid ~= -1);
-
+fprintf(1, '/');
 fprintf(fid, '%% Section Object\n');
 if ~isempty(o.height)
     fprintf(fid, '\\setlength\\sectionheight{%s}%%\n', o.height);
@@ -51,7 +51,6 @@ ne = numElements(o);
 nvspace = numVspace(o);
 nlcounter = 0;
 for i=1:ne
-    disp(['Writing Section Element: ' num2str(i)]);
     if isa(o.elements(i), 'vspace')
         assert(rem(nlcounter, o.cols) == 0, ['@section.write: must place ' ...
                             'vspace command after a linebreak in the table ' ...
diff --git a/matlab/reports/@sections/addSection.m b/matlab/reports/@sections/addSection.m
index d2190ae848..bdf1c1e0d8 100644
--- a/matlab/reports/@sections/addSection.m
+++ b/matlab/reports/@sections/addSection.m
@@ -1,7 +1,7 @@
 function o = addSection(o, varargin)
 % function o = addSection(o, varargin)
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -18,6 +18,6 @@ function o = addSection(o, varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
-disp(['Processing Section: ' num2str(numSections(o)+1)]);
+fprintf(1, '/');
 o.objArray = o.objArray.addObj(section(varargin{:}));
 end
\ No newline at end of file
diff --git a/matlab/reports/@sections/write.m b/matlab/reports/@sections/write.m
index d354d331f9..6c87a43eaa 100644
--- a/matlab/reports/@sections/write.m
+++ b/matlab/reports/@sections/write.m
@@ -12,7 +12,7 @@ function o = write(o, fid)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -33,7 +33,6 @@ assert(fid ~= -1);
 fprintf(fid, '\n%% Sections Object\n');
 nps = numSections(o);
 for i=1:nps
-    disp(['Writing Section: ' num2str(i)]);
     o.objArray(i).write(fid);
 end
 fprintf(fid, '%% End Sections Object\n\n');
diff --git a/matlab/reports/@vspace/write.m b/matlab/reports/@vspace/write.m
index b3d2fb2bb1..1808f88dff 100644
--- a/matlab/reports/@vspace/write.m
+++ b/matlab/reports/@vspace/write.m
@@ -12,7 +12,7 @@ function o = write(o, fid)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2013 Dynare Team
+% Copyright (C) 2013-2014 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -41,4 +41,5 @@ if o.hline > 0
         fprintf(fid, '\\midrule');
     end
 end
+fprintf(1, '.');
 end
\ No newline at end of file
-- 
GitLab