[Scummvm-cvs-logs] SF.net SVN: scummvm: [21937] scummvm/trunk/common
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Apr 16 05:51:03 CEST 2006
Revision: 21937
Author: fingolfin
Date: 2006-04-16 05:50:39 -0700 (Sun, 16 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21937&view=rev
Log Message:
-----------
Removed the directory parameter from md5_file
Modified Paths:
--------------
scummvm/trunk/common/file.cpp
scummvm/trunk/common/md5.cpp
scummvm/trunk/common/md5.h
scummvm/trunk/engines/gob/gob.cpp
scummvm/trunk/engines/kyra/kyra.cpp
scummvm/trunk/engines/lure/lure.cpp
scummvm/trunk/engines/saga/game.cpp
scummvm/trunk/engines/scumm/plugin.cpp
scummvm/trunk/engines/simon/game.cpp
Modified: scummvm/trunk/common/file.cpp
===================================================================
--- scummvm/trunk/common/file.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/common/file.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -198,7 +198,6 @@
clearIOFailed();
String fname(filename);
-
fname.toLowercase();
const char *modeStr = (mode == kFileReadMode) ? "rb" : "wb";
Modified: scummvm/trunk/common/md5.cpp
===================================================================
--- scummvm/trunk/common/md5.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/common/md5.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -233,7 +233,7 @@
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 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;
Modified: scummvm/trunk/common/md5.h
===================================================================
--- scummvm/trunk/common/md5.h 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/common/md5.h 2006-04-16 12:50:39 UTC (rev 21937)
@@ -36,7 +36,7 @@
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
Modified: scummvm/trunk/engines/gob/gob.cpp
===================================================================
--- scummvm/trunk/engines/gob/gob.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/engines/gob/gob.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -316,7 +316,7 @@
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 @@
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]);
}
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/engines/kyra/kyra.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -180,7 +180,7 @@
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 @@
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]);
}
Modified: scummvm/trunk/engines/lure/lure.cpp
===================================================================
--- scummvm/trunk/engines/lure/lure.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/engines/lure/lure.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -130,7 +130,7 @@
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 @@
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]);
}
Modified: scummvm/trunk/engines/saga/game.cpp
===================================================================
--- scummvm/trunk/engines/saga/game.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/engines/saga/game.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -1541,7 +1541,7 @@
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 @@
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]);
}
Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/engines/scumm/plugin.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -1134,7 +1134,7 @@
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 @@
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 @@
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]);
}
Modified: scummvm/trunk/engines/simon/game.cpp
===================================================================
--- scummvm/trunk/engines/simon/game.cpp 2006-04-16 12:39:59 UTC (rev 21936)
+++ scummvm/trunk/engines/simon/game.cpp 2006-04-16 12:50:39 UTC (rev 21937)
@@ -1289,7 +1289,7 @@
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 @@
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]);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list