[Scummvm-cvs-logs] scummvm-tools master -> c69bd5ec1a3cf7452f9a38f6297d291b3f4b0ffa
criezy
criezy at scummvm.org
Tue Nov 22 02:15:22 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .
Summary:
c69bd5ec1a TOOLS: Clean compress_tucker code a bit
Commit: c69bd5ec1a3cf7452f9a38f6297d291b3f4b0ffa
https://github.com/scummvm/scummvm-tools/commit/c69bd5ec1a3cf7452f9a38f6297d291b3f4b0ffa
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2011-11-21T17:15:03-08:00
Commit Message:
TOOLS: Clean compress_tucker code a bit
This adds a missing end of lines at the end of a warning, remove
duplicate consecutive '/' in path and correctly set the input file flag
to false.
Changed paths:
engines/tucker/compress_tucker.cpp
diff --git a/engines/tucker/compress_tucker.cpp b/engines/tucker/compress_tucker.cpp
index 88acbd3..9031879 100644
--- a/engines/tucker/compress_tucker.cpp
+++ b/engines/tucker/compress_tucker.cpp
@@ -48,6 +48,7 @@ CompressTucker::CompressTucker(const std::string &name) : CompressionTool(name,
ToolInput input;
input.format = "/";
+ input.file = false;
_inputPaths.push_back(input);
_shorthelp = "Used to compress the Bud Tucker data files.";
@@ -311,7 +312,7 @@ uint32 CompressTucker::compress_audio_directory(const Common::Filename *inpath,
current_offset = 0;
for (i = 0; i < count; ++i) {
temp_table[i].offset = current_offset;
- snprintf(filepath, sizeof(filepath), "%s/AUDIO/%s", inpath->getPath().c_str(), audio_files_list[i]);
+ snprintf(filepath, sizeof(filepath), "%sAUDIO/%s", inpath->getPath().c_str(), audio_files_list[i]);
try {
Common::File input(filepath, "rb");
@@ -329,7 +330,7 @@ uint32 CompressTucker::compress_audio_directory(const Common::Filename *inpath,
break;
}
} catch (...) {
- warning("Can't open file '%s'", filepath);
+ warning("Can't open file '%s'\n", filepath);
temp_table[i].size = 0;
}
@@ -418,9 +419,9 @@ void CompressTucker::execute() {
// Ensure necessary directories are present
for (int i = 0; inputDirs[i]; ++i) {
char path[1024];
- snprintf(path, sizeof(path), "%s/%s", inpath.getPath().c_str(), inputDirs[i]);
+ snprintf(path, sizeof(path), "%s%s", inpath.getPath().c_str(), inputDirs[i]);
if (!Common::isDirectory(path)) {
- error("Missing input directory '%s'", path);
+ error("Missing input directory '%s'\n", path);
}
}
More information about the Scummvm-git-logs
mailing list