aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-04-16 12:50:39 +0000
committerMax Horn2006-04-16 12:50:39 +0000
commitba1b25305eb824f89f4dfa153f8022c5c5f4e798 (patch)
treed9890c75367bc3a3e3b77b43a84de47bf2b86abb
parent856b1b0bf4864252434b612dec1f01100a2e9c5c (diff)
downloadscummvm-rg350-ba1b25305eb824f89f4dfa153f8022c5c5f4e798.tar.gz
scummvm-rg350-ba1b25305eb824f89f4dfa153f8022c5c5f4e798.tar.bz2
scummvm-rg350-ba1b25305eb824f89f4dfa153f8022c5c5f4e798.zip
Removed the directory parameter from md5_file
svn-id: r21937
-rw-r--r--common/file.cpp1
-rw-r--r--common/md5.cpp4
-rw-r--r--common/md5.h2
-rw-r--r--engines/gob/gob.cpp4
-rw-r--r--engines/kyra/kyra.cpp4
-rw-r--r--engines/lure/lure.cpp4
-rw-r--r--engines/saga/game.cpp4
-rw-r--r--engines/scumm/plugin.cpp6
-rw-r--r--engines/simon/game.cpp4
9 files changed, 16 insertions, 17 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 00707c4f7e..ec4dca0594 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -198,7 +198,6 @@ bool File::open(const String &filename, AccessMode mode, const char *directory)
clearIOFailed();
String fname(filename);
-
fname.toLowercase();
const char *modeStr = (mode == kFileReadMode) ? "rb" : "wb";
diff --git a/common/md5.cpp b/common/md5.cpp
index 9d42c4bd61..78d844a706 100644
--- a/common/md5.cpp
+++ b/common/md5.cpp
@@ -233,7 +233,7 @@ void md5_finish(md5_context *ctx, uint8 digest[16]) {
PUT_UINT32(ctx->state[3], digest, 12);
}
-bool md5_file(const char *name, uint8 digest[16], const char *directory, uint32 length) {
+bool md5_file(const char *name, uint8 digest[16], uint32 length) {
File f;
md5_context ctx;
int i;
@@ -241,7 +241,7 @@ bool md5_file(const char *name, uint8 digest[16], const char *directory, uint32
bool restricted = (length != 0);
int readlen;
- f.open(name, File::kFileReadMode, directory);
+ f.open(name);
if (!f.isOpen()) {
warning("md5_file couldn't open '%s'", name);
return false;
diff --git a/common/md5.h b/common/md5.h
index be1e8214b1..b8e4a95464 100644
--- a/common/md5.h
+++ b/common/md5.h
@@ -36,7 +36,7 @@ void md5_starts(md5_context *ctx);
void md5_update(md5_context *ctx, const uint8 *input, uint32 length);
void md5_finish(md5_context *ctx, uint8 digest[16]);
-bool md5_file(const char *name, uint8 digest[16], const char *directory = NULL, uint32 length = 0);
+bool md5_file(const char *name, uint8 digest[16], uint32 length = 0);
} // End of namespace Common
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index 4a968bb4b3..e5b9979147 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -316,7 +316,7 @@ DetectedGameList Engine_GOB_detectGames(const FSList &fslist) {
uint8 md5sum[16];
char md5str[32 + 1];
- if (Common::md5_file(file->path().c_str(), md5sum, NULL, kMD5FileSizeLimit)) {
+ if (Common::md5_file(file->path().c_str(), md5sum, kMD5FileSizeLimit)) {
for (int i = 0; i < 16; i++) {
sprintf(md5str + i * 2, "%02x", (int)md5sum[i]);
}
@@ -343,7 +343,7 @@ Engine *Engine_GOB_create(OSystem *syst) {
uint8 md5sum[16];
char md5str[32 + 1];
- if (Common::md5_file("intro.stk", md5sum, NULL, kMD5FileSizeLimit)) {
+ if (Common::md5_file("intro.stk", md5sum, kMD5FileSizeLimit)) {
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index 328d407768..bb3a445c24 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -180,7 +180,7 @@ DetectedGameList Engine_KYRA_detectGames(const FSList &fslist) {
uint8 md5sum[16];
char md5str[32 + 1];
- if (Common::md5_file(file->path().c_str(), md5sum, NULL, kMD5FileSizeLimit)) {
+ if (Common::md5_file(file->path().c_str(), md5sum, kMD5FileSizeLimit)) {
for (int i = 0; i < 16; i++) {
sprintf(md5str + i * 2, "%02x", (int)md5sum[i]);
}
@@ -279,7 +279,7 @@ KyraEngine::KyraEngine(OSystem *system)
if (!Common::File::exists(g->checkFile))
continue;
- if (Common::md5_file(g->checkFile, md5sum, NULL, kMD5FileSizeLimit)) {
+ if (Common::md5_file(g->checkFile, md5sum, kMD5FileSizeLimit)) {
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 84d035b318..5ec33994a3 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -130,7 +130,7 @@ DetectedGameList Engine_LURE_detectGames(const FSList &fslist) {
uint8 md5sum[16];
char md5str[32 + 1];
- if (Common::md5_file(file->path().c_str(), md5sum, NULL, kMD5FileSizeLimit)) {
+ if (Common::md5_file(file->path().c_str(), md5sum, kMD5FileSizeLimit)) {
for (int i = 0; i < 16; i++) {
sprintf(md5str + i * 2, "%02x", (int)md5sum[i]);
}
@@ -225,7 +225,7 @@ void LureEngine::detectGame() {
if (!Common::File::exists(g->checkFile))
continue;
- if (Common::md5_file(g->checkFile, md5sum, NULL, kMD5FileSizeLimit)) {
+ if (Common::md5_file(g->checkFile, md5sum, kMD5FileSizeLimit)) {
for (int j = 0; j < 16; j++) {
sprintf(md5str + j * 2, "%02x", (int)md5sum[j]);
}
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp
index 10c009b8f1..041db02494 100644
--- a/engines/saga/game.cpp
+++ b/engines/saga/game.cpp
@@ -1541,7 +1541,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
if (!filesList.contains(tstr)) continue;
- if (!Common::md5_file(file->path().c_str(), md5sum, NULL, FILE_MD5_BYTES)) continue;
+ if (!Common::md5_file(file->path().c_str(), md5sum, FILE_MD5_BYTES)) continue;
for (j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
@@ -1558,7 +1558,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
if (testFile.open(file->_key)) {
testFile.close();
- if (Common::md5_file(file->_key.c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
+ if (Common::md5_file(file->_key.c_str(), md5sum, FILE_MD5_BYTES)) {
for (j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index f1087040b7..1d2ec6b4f8 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -1134,7 +1134,7 @@ void detectGames(const FSList &fslist) {
DetectorDesc &d = fileMD5Map[file];
if (d.md5.empty()) {
uint8 md5sum[16];
- if (Common::md5_file(d.path.c_str(), md5sum, 0, kMD5FileSizeLimit)) {
+ if (Common::md5_file(d.path.c_str(), md5sum, kMD5FileSizeLimit)) {
char md5str[32+1];
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
@@ -1583,7 +1583,7 @@ DetectedGameList Engine_SCUMM_detectGames(const FSList &fslist) {
uint8 md5sum[16];
const char *name = iter->_key.c_str();
- if (Common::md5_file(name, md5sum, 0, kMD5FileSizeLimit)) {
+ if (Common::md5_file(name, md5sum, kMD5FileSizeLimit)) {
char md5str[32+1];
for (int j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
@@ -1738,7 +1738,7 @@ Engine *Engine_SCUMM_create(OSystem *syst) {
if (!md5) {
// Compute the MD5 of the file, and (if we succeeded) store a hex version
// of it in gameMD5 (useful to print it to the user in messages).
- if (Common::md5_file(detectName, md5sum, NULL, kMD5FileSizeLimit)) {
+ if (Common::md5_file(detectName, md5sum, kMD5FileSizeLimit)) {
for (int j = 0; j < 16; j++) {
sprintf(md5buf + j*2, "%02x", (int)md5sum[j]);
}
diff --git a/engines/simon/game.cpp b/engines/simon/game.cpp
index 0adf22cb65..b1340bf2b1 100644
--- a/engines/simon/game.cpp
+++ b/engines/simon/game.cpp
@@ -1289,7 +1289,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
if (!filesList.contains(tstr) && !filesList.contains(tstr2)) continue;
- if (!Common::md5_file(file->path().c_str(), md5sum, NULL, FILE_MD5_BYTES)) continue;
+ if (!Common::md5_file(file->path().c_str(), md5sum, FILE_MD5_BYTES)) continue;
for (j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}
@@ -1307,7 +1307,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
if (testFile.open(file->_key)) {
testFile.close();
- if (Common::md5_file(file->_key.c_str(), md5sum, NULL, FILE_MD5_BYTES)) {
+ if (Common::md5_file(file->_key.c_str(), md5sum, FILE_MD5_BYTES)) {
for (j = 0; j < 16; j++) {
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
}