diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-12-01 00:15:28 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2009-12-01 00:15:28 +0100 |
commit | 137e20e9667287541991e4196097bd48fae3a2f0 (patch) | |
tree | 6407d15a76822e0b753873ca11a4ccbe094bb152 /src/paq.cc | |
parent | 99e08d03cf75a35c40e7f5ccb2d616865c3153a0 (diff) |
Adapting paq.cc to nowadays's standards.
Diffstat (limited to 'src/paq.cc')
-rw-r--r-- | src/paq.cc | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,6 +1,6 @@ #include <dirent.h> #include <unistd.h> -#include <iostream.h> +#include <iostream> #include <list> #include <Main.h> #include <Input.h> @@ -18,7 +18,7 @@ String current_dir; -extern "C" int sortdir(const void * d1, const void * d2) { +extern "C" int sortdir(const dirent ** d1, const dirent ** d2) { struct stat fstats1, fstats2; String n; @@ -54,7 +54,7 @@ void finalize(void) { int size; Input * file; for (std::list<String>::iterator i = filelist.begin(); i != filelist.end(); i++) { - cerr << "Finalize file " << *i << endl; + std::cerr << "Finalize file " << *i << std::endl; file = new Input(*i); size = file->GetSize(); Archive->writeU32(size); @@ -69,7 +69,7 @@ void finalize(void) { void process_file(const String & filename) { char t; int size, old_size; - cerr << "Processing file " << filename << "... "; + std::cerr << "Processing file " << filename << "... "; Input * from = new Input(filename); Output * to = new Output(filename + ".gz"); @@ -87,7 +87,7 @@ void process_file(const String & filename) { from = new Input(filename + ".gz"); size = from->GetSize() + 4; - cerr << old_size << " --> " << from->GetSize() << " (" << 100 * from->GetSize() / old_size << "%)\n"; + std::cerr << old_size << " --> " << from->GetSize() << " (" << 100 * from->GetSize() / old_size << "%)\n"; Archive->writeU32(size); @@ -106,7 +106,7 @@ void process_directory(const String & dirname) throw (GeneralException) { current_dir = dirname; n = scandir(dirname.to_charp(), &namelist, NULL, sortdir); - cerr << "Processing directory " << dirname << endl; + std::cerr << "Processing directory " << dirname << std::endl; if (n < 0) { throw GeneralException("Unable to open directory " + dirname); |