diff options
Diffstat (limited to 'lib/Input.cc')
| -rw-r--r-- | lib/Input.cc | 35 | 
1 files changed, 17 insertions, 18 deletions
diff --git a/lib/Input.cc b/lib/Input.cc index 9697913..8ce13cf 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -70,7 +70,7 @@ Input::Input(const String & no) throw (GeneralException) :      n(no) {  #ifdef DEBUG     -    fprintf(stderr, "Opening file %s, Input at %p\n", no.to_charp(), this); +    fprintf(stderr, _("Opening file %s, Input at %p\n"), no.to_charp(), this);  #endif      if (GetHandle() < 0) { @@ -91,7 +91,7 @@ Input::Input(const String & no) throw (GeneralException) :  	}      } else {  #ifdef DEBUG -	std::cerr << "Opening file in archive, position " << results.ptr << std::endl; +	std::cerr << _("Opening file in archive, position ") << results.ptr << std::endl;  #endif  	size = results.size;  	seek(results.ptr, SEEK_SET); @@ -151,14 +151,14 @@ off_t Input::seek(off_t offset, int whence) throw (GeneralException) {  int Input::wrapopen(const String & fname, openresults_t * results) {  #ifdef DEBUG -    std::cerr << "Wrap-opening " << fname << std::endl; +    std::cerr << _("Wrap-opening ") << fname << std::endl;  #endif      if (fname[0] != '/') {  	bool t;  	t = Archive::inarchive(fname);  	if (t) {  #ifdef DEBUG -	    std::cerr << "Trying to open the file in archive, since it seems to be here\n"; +	    std::cerr << _("Trying to open the file in archive, since it seems to be here\n");  #endif  	    return Archive::open(fname, results);  	} @@ -200,7 +200,7 @@ Archive::Archive(const String & fname, int atype) throw (GeneralException) :      case ARCHIVE_BUILTIN:  	archive.read(buffer, 4);  	if (*((Uint32 *)buffer) != BUILTIN_SIG) -	    throw GeneralException("Archive: not in built-in format."); +	    throw GeneralException(_("Archive: not in built-in format."));  	while (p) {  	    archive.read(buffer, 1);  	    len = *buffer; @@ -211,7 +211,7 @@ Archive::Archive(const String & fname, int atype) throw (GeneralException) :  		size = archive.readU32();  		archive.read(buffer, 1);  #ifdef DEBUG -		std::cerr << "Adding file `" << ifname << "' to node `" << p->name << "'\n"; +		std::cerr << _("Adding file `") << ifname << _("' to node `") << p->name << "'\n";  #endif  		t = new FileTree(ifname, size, buffer[0], p);  		if (buffer[0]) @@ -223,7 +223,7 @@ Archive::Archive(const String & fname, int atype) throw (GeneralException) :  	filetree.compute_ptrs(archive.tell());  	break;      default: -	throw GeneralException("Archive: unsupported archive format."); +	throw GeneralException(_("Archive: unsupported archive format."));      }      next = header; @@ -247,11 +247,11 @@ bool Archive::inarchive(const String & fname) {      Archive * p;      for (p = header; p; p = p->next) {  #ifdef DEBUG -	std::cerr << "Looking for file `" << fname << "' in archive " << p->name << std::endl; +	std::cerr << _("Looking for file `") << fname << _("' in archive ") << p->name << std::endl;  #endif  	if (p->inarchivein(fname)) {  #ifdef DEBUG -	    std::cerr << "File `" << fname << "' found in archive " << p->name << std::endl; +	    std::cerr << _("File `") << fname << _("' found in archive ") << p->name << std::endl;  #endif  	    return true;  	} @@ -268,7 +268,7 @@ int Archive::open(const String & fname, Input::openresults_t * results) throw (G  	if (t)  	    return p->openin(fname, results);      } -    throw IOGeneral("File `" + fname + "' not found in archive collection."); +    throw IOGeneral(_("File `") + fname + _("' not found in archive collection."));  }  bool Archive::inarchivein(const String & fname) { @@ -287,8 +287,7 @@ bool Archive::inarchivein(const String & fname) {  	    name = "";  	}  #ifdef DEBUG -	std::cerr << "inarchivein: reste = `" << reste << "' - name = `" << name << "'\n"; -	std::cerr << "Checking against node `" << p->name << "'\n"; +	std::cerr << _("Checking against node `") << p->name << "'\n";  #endif  	while (p) {  	    if (p->name == reste) { @@ -332,10 +331,10 @@ int Archive::openin(const String & fname, Input::openresults_t * results) throw      }      if (!p) -	throw IOGeneral("File `" + fname + "' not in archive " + this->name); +	throw IOGeneral(_("File `") + fname + _("' not in archive ") + this->name);      if (p->Child()) -	throw IOGeneral("File `" + fname + "' in archive " + this->name + " is a directory - can't open."); +	throw IOGeneral(_("File `") + fname + _("' in archive ") + this->name + _(" is a directory - can't open."));      results->name = p->name;      results->ptr = p->ptr; @@ -354,7 +353,7 @@ Archive::FileTree::FileTree(const String & fname, size_t fsize, int ftype, Archi  	    prev = p;  	} else {  #ifdef DEBUG -	    std::cerr << "Adding `" << fname << "' as first child of node `" << father->name << "'\n"; +	    std::cerr << _("Adding `") << fname << _("' as first child of node `") << father->name << "'\n";  #endif  	    father->child = this;  	} @@ -386,11 +385,11 @@ int Archive::FileTree::compute_ptrs(size_t cptr) {      ptr = cptr;  #ifdef DEBUG -    std::cerr << "Computed pointer for `" << name << "' = " << ptr << std::endl; +    std::cerr << _("Computed pointer for `") << name << "' = " << ptr << std::endl;      if (child) -	std::cerr << "Node has child\n"; +	std::cerr << _("Node has child\n");      else -	std::cerr << "Node is " << size << " bytes large.\n"; +	std::cerr << _("Node is ") << size << _(" bytes large.\n");  #endif      if (child) {  | 
