[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.80,1.81 file.h,1.35,1.36 md5.cpp,1.7,1.8 md5.h,1.6,1.7
Max Horn
fingolfin at users.sourceforge.net
Tue May 10 16:00:28 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sound/softsynth mt32.cpp,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/simon icons.cpp,1.4,1.5 midi.cpp,1.68,1.69 midi.h,1.28,1.29 res.cpp,1.31,1.32 simon.cpp,1.502,1.503 simon.h,1.137,1.138 sound.cpp,1.83,1.84 sound.h,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17315/common
Modified Files:
file.cpp file.h md5.cpp md5.h
Log Message:
Moved class File and the MD5 stuff to namespace Common
Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- file.cpp 9 May 2005 21:21:18 -0000 1.80
+++ file.cpp 10 May 2005 22:55:47 -0000 1.81
@@ -22,8 +22,9 @@
#include "common/file.h"
#include "common/util.h"
+namespace Common {
-Common::StringList File::_defaultDirectories;
+StringList File::_defaultDirectories;
static FILE *fopenNoCase(const char *filename, const char *directory, const char *mode) {
@@ -99,7 +100,7 @@
return file;
}
-void File::addDefaultDirectory(const Common::String &directory) {
+void File::addDefaultDirectory(const String &directory) {
_defaultDirectories.push_back(directory);
}
@@ -153,7 +154,7 @@
if (mode == kFileWriteMode || directory) {
_handle = fopenNoCase(filename, directory ? directory : "", modeStr);
} else {
- Common::StringList::const_iterator x;
+ StringList::const_iterator x;
// Try all default directories
for (x = _defaultDirectories.begin(); _handle == NULL && x != _defaultDirectories.end(); ++x) {
_handle = fopenNoCase(filename, x->c_str(), modeStr);
@@ -282,3 +283,5 @@
return len;
}
+
+} // End of namespace Common
Index: file.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- file.h 6 May 2005 13:10:58 -0000 1.35
+++ file.h 10 May 2005 22:55:47 -0000 1.36
@@ -27,7 +27,9 @@
#include "common/str.h"
#include "common/stream.h"
-class File : public Common::SeekableReadStream, public Common::WriteStream {
+namespace Common {
+
+class File : public SeekableReadStream, public WriteStream {
protected:
/** POSIX file handle to the actual file; 0 if no file is open. */
FILE *_handle;
@@ -39,10 +41,10 @@
int32 _refcount;
/** The name of this file, for debugging. */
- Common::String _name;
+ String _name;
- static Common::StringList _defaultDirectories;
+ static StringList _defaultDirectories;
public:
enum AccessMode {
@@ -50,7 +52,7 @@
kFileWriteMode = 2
};
- static void addDefaultDirectory(const Common::String &directory);
+ static void addDefaultDirectory(const String &directory);
static void resetDefaultDirectories();
File();
@@ -76,4 +78,6 @@
uint32 write(const void *dataPtr, uint32 dataSize);
};
+} // End of namespace Common
+
#endif
Index: md5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/md5.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- md5.cpp 8 May 2005 21:49:32 -0000 1.7
+++ md5.cpp 10 May 2005 22:55:47 -0000 1.8
@@ -30,6 +30,8 @@
#include "common/md5.h"
#include "common/util.h"
+namespace Common {
+
#define GET_UINT32(n,b,i) (n) = READ_LE_UINT32(b + i)
#define PUT_UINT32(n,b,i) WRITE_LE_UINT32(b + i, n)
@@ -278,6 +280,8 @@
return true;
}
+} // End of namespace Common
+
#ifdef TEST
#include <stdlib.h>
Index: md5.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/md5.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- md5.h 1 Jan 2005 16:08:49 -0000 1.6
+++ md5.h 10 May 2005 22:55:47 -0000 1.7
@@ -23,6 +23,8 @@
#include "common/scummsys.h"
+namespace Common {
+
typedef struct
{
uint32 total[2];
@@ -37,4 +39,6 @@
bool md5_file( const char *name, uint8 digest[16], const char *directory = NULL, uint32 length = 0 );
+} // End of namespace Common
+
#endif
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sound/softsynth mt32.cpp,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm/simon icons.cpp,1.4,1.5 midi.cpp,1.68,1.69 midi.h,1.28,1.29 res.cpp,1.31,1.32 simon.cpp,1.502,1.503 simon.h,1.137,1.138 sound.cpp,1.83,1.84 sound.h,1.23,1.24
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list