diff options
author | pixel <pixel> | 2003-03-19 17:03:54 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-03-19 17:03:54 +0000 |
commit | 8212ce04cafa89e0a3f3b46e7fb2940548e08214 (patch) | |
tree | 205182443cbeae8c84ff490f60651f62fd592a1b /lib/Handle.cc | |
parent | ab910aaa8c5e6afc05d0a2e17022565d1de92f67 (diff) |
I am the dumbest...
Diffstat (limited to 'lib/Handle.cc')
-rw-r--r-- | lib/Handle.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index de4114e..7207f36 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -40,7 +40,7 @@ enum { Handle::Handle(const Handle & nh) : itell(0), h(nh.h >= 0 ? dup(nh.h) : nh.h), closed(nh.closed), nonblock(nh.closed), zfile(0), z(0) { #ifdef DEBUG - std::cerr << _("Duplication of handle ") << nh.h << _(" to ") << h << std::endl; + printm(M_INFO, String(_("Duplication of handle ")) + nh.h + _(" to ") + h + "\n"); #endif if ((h >= 0) && (nh.z)) { SetZ(nh.z); @@ -49,7 +49,7 @@ Handle::Handle(const Handle & nh) : itell(0), h(nh.h >= 0 ? dup(nh.h) : nh.h), c Handle::~Handle() { #ifdef DEBUG - std::cerr << _("Destroying handle ") << h << std::endl; + printm(M_INFO, String(_("Destroying handle ")) + h + "\n"); #endif close(); } @@ -57,7 +57,7 @@ Handle::~Handle() { Handle::Handle(int nh) : h(nh), closed(false), nonblock(false), zfile(0), z(0) { #ifdef DEBUG - std::cerr << _("Initialising handle ") << h << std::endl; + printm(M_INFO, String(_("Initialising handle ")) + h + "\n"); #endif } @@ -92,7 +92,7 @@ ssize_t Handle::write(const void *cbuf, size_t count) throw (GeneralException) { full = true; if (nonblock) { #ifdef DEBUG - std::cerr << _("write: throwing IOAgain for handle ") << GetName() << std::endl; + printm(M_INFO, _("write: throwing IOAgain for handle ") + GetName() + "\n"); #endif throw IOAgain(); } else { @@ -121,7 +121,7 @@ ssize_t Handle::read(void *buf, size_t count) throw (GeneralException) { ssize_t r; #ifdef FULLDEBUG - std::cerr << _("read: reading ") << count << _(" bytes from handle ") << GetHandle() << std::endl; + printm(M_INFO, String(_("read: reading ")) + count + _(" bytes from handle ") + GetHandle() + "\n"); #endif errno = 0; @@ -131,7 +131,7 @@ ssize_t Handle::read(void *buf, size_t count) throw (GeneralException) { // problème lié au fait qu'il n'y a plus d'octets. if (nonblock) { #ifdef DEBUG - std::cerr << _("read: throwing IOAgain for handle ") << GetName() << std::endl; + printm(M_INFO, _("read: throwing IOAgain for handle ") + GetName() + "\n"); #endif throw IOAgain(); } @@ -223,11 +223,11 @@ void Handle::close() throw (GeneralException) { } } else if (z) { #ifdef DEBUG - std::cerr << _("Performing gzclose on handle ") << h << std::endl; + printm(M_INFO, String(_("Performing gzclose on handle ")) + h + "\n"); #endif int err = gzclose(zfile); #ifdef DEBUG - std::cerr << _("gzclose returned ") << err << std::endl; + printm(M_INFO, String(_("gzclose returned ")) + err + "\n"); #endif if (err) { if (err == Z_ERRNO) { @@ -286,7 +286,7 @@ void Handle::SetZ(int az) throw (GeneralException) { } if (az >= 10) { #ifdef DEBUG - std::cerr << _("Setting up zstream using inflate/deflate...\n"); + printm(M_INFO, _("Setting up zstream using inflate/deflate...\n")); #endif int err; zstrm.zalloc = Z_NULL; @@ -318,7 +318,7 @@ void Handle::SetZ(int az) throw (GeneralException) { format[index++] = (char) (az + '0'); format[index] = 0; #ifdef FULLDEBUG - std::cerr << _("Performing gzdopen on handle ") << h << _(" with mode \"") << format << "\"\n"; + printm(M_INFO, _("Performing gzdopen on handle ") << h << _(" with mode \"") + format + "\"\n"; #endif if (!(zfile = gzdopen(h, format))) { throw GeneralException(_("Was not able to gzdopen.")); @@ -331,7 +331,7 @@ ssize_t Handle::uwrite(const void * buf, size_t count) throw (GeneralException) if (z >= 10) { } else if (z) { #ifdef FULLDEBUG - std::cerr << _("Performing gzwrite of ") << count << _(" byte(s) for handle ") << h << std::endl; + printm(M_INFO, String(_("Performing gzwrite of ")) + count + _(" byte(s) for handle ") + h + "\n"); #endif #ifdef HAVE_WD_ZLIB int err = gzwrite(zfile, buf, count); @@ -358,7 +358,7 @@ ssize_t Handle::uread(void * buf, size_t count) { if (z >= 10) { } if (z) { #ifdef DEBUG - std::cerr << _("Performing gzread of ") << count << _(" byte(s) for handle ") << h << std::endl; + printm(M_BARE, String(_("Performing gzread of ")) + count + _(" byte(s) for handle ") + h + "\n"); #endif int err = gzread(zfile, buf, count); if (err == -1) { |