diff options
Diffstat (limited to 'lib/Handle.cc')
-rw-r--r-- | lib/Handle.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index 255eacd..de4114e 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; + std::cerr << _("Duplication of handle ") << nh.h << _(" to ") << h << std::endl; #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; + std::cerr << _("Destroying handle ") << h << std::endl; #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; + std::cerr << _("Initialising handle ") << h << std::endl; #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; + std::cerr << _("write: throwing IOAgain for handle ") << GetName() << std::endl; #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; + std::cerr << _("read: reading ") << count << _(" bytes from handle ") << GetHandle() << std::endl; #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; + std::cerr << _("read: throwing IOAgain for handle ") << GetName() << std::endl; #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; + std::cerr << _("Performing gzclose on handle ") << h << std::endl; #endif int err = gzclose(zfile); #ifdef DEBUG - std::cerr << "gzclose returned " << err << std::endl; + std::cerr << _("gzclose returned ") << err << std::endl; #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"; + std::cerr << _("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"; + std::cerr << _("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 for handle " << h << std::endl; + std::cerr << _("Performing gzwrite of ") << count << _(" byte(s) for handle ") << h << std::endl; #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 for handle " << h << std::endl; + std::cerr << _("Performing gzread of ") << count << _(" byte(s) for handle ") << h << std::endl; #endif int err = gzread(zfile, buf, count); if (err == -1) { @@ -393,7 +393,7 @@ off_t Handle::seek(off_t offset, int whence) throw(GeneralException) { if (z) { return itell = gzseek(zfile, offset, whence); } else { - throw IOGeneral("Handle " + GetName() + " can't seek"); + throw IOGeneral(_("Handle ") + GetName() + _(" can't seek")); } } |