diff options
Diffstat (limited to 'lib/Input.cc')
-rw-r--r-- | lib/Input.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Input.cc b/lib/Input.cc index eab56e1..23bb55e 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Input.cc,v 1.53 2007-05-30 11:57:10 pixel Exp $ */ +/* $Id: Input.cc,v 1.54 2008-01-21 17:55:43 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -86,6 +86,12 @@ those 4 bytes. static Input::openresults_t gresults; +int Input::nb_input = 0; + +int Input::GetNbInput() { + return nb_input; +} + Input::Input(const String & no) throw (GeneralException) : Handle(no.strlen() ? wrapopen(no, &gresults) : dup(0)), n(no) { @@ -101,6 +107,8 @@ Input::Input(const String & no) throw (GeneralException) : throw IOGeneral(String(_("Error opening file ")) + no + _(" for reading: ") + strerror(errno)); } + nb_input++; + results = gresults; UNLOCK @@ -140,6 +148,7 @@ Input::Input(const String & no) throw (GeneralException) : } Input::Input(const Input & i) : Handle(i), n(i.n), size(i.size), date_modif(i.date_modif) { + nb_input++; } bool Input::CanWrite() const { |