[Scummvm-cvs-logs] CVS: scummvm/common stream.h,1.17,1.18 savefile.cpp,1.19,1.20
Max Horn
fingolfin at users.sourceforge.net
Thu May 5 09:00:12 CEST 2005
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30031/common
Modified Files:
stream.h savefile.cpp
Log Message:
Fixed some doxygen warnings
Index: stream.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/stream.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- stream.h 28 Apr 2005 20:59:19 -0000 1.17
+++ stream.h 5 May 2005 15:59:06 -0000 1.18
@@ -60,11 +60,11 @@
* Write data into the stream. Subclasses must implement this
* method; all other write methods are implemented using it.
*
- * @param ptr pointer to the data to be written
- * @param size number of bytes to be written
+ * @param dataPtr pointer to the data to be written
+ * @param dataSize number of bytes to be written
* @return the number of bytes which were actually written.
*/
- virtual uint32 write(const void *ptr, uint32 size) = 0;
+ virtual uint32 write(const void *dataPtr, uint32 dataSize) = 0;
// The remaining methods all have default implementations; subclasses
@@ -132,11 +132,11 @@
* Read data from the stream. Subclasses must implement this
* method; all other read methods are implemented using it.
*
- * @param ptr pointer to a buffer into which the data is read
- * @param size number of bytes to be read
+ * @param dataPtr pointer to a buffer into which the data is read
+ * @param dataSize number of bytes to be read
* @return the number of bytes which were actually read.
*/
- virtual uint32 read(void *ptr, uint32 size) = 0;
+ virtual uint32 read(void *dataPtr, uint32 dataSize) = 0;
// The remaining methods all have default implementations; subclasses
@@ -215,7 +215,7 @@
* This method is a rough analog of the (f)gets function.
*
* @param buf the buffer to store into
- * @param size the size of the buffer
+ * @param bufSize the size of the buffer
* @return a pointer to the read string, or NULL if an error occured
* @note The line terminator (CR or CR/LF) is stripped and not inserted
* into the buffer.
@@ -245,11 +245,11 @@
virtual bool ioFailed() const { return _realStream->ioFailed(); }
virtual void clearIOFailed() { _realStream->clearIOFailed(); }
- uint32 read(void *ptr, uint32 size) {
+ uint32 read(void *dataPtr, uint32 dataSize) {
assert(_realStream);
- uint32 len = _realStream->read(ptr, size);
+ uint32 len = _realStream->read(dataPtr, dataSize);
if (_encbyte) {
- byte *p = (byte *)ptr;
+ byte *p = (byte *)dataPtr;
byte *end = p + len;
while (p < end)
*p++ ^= _encbyte;
@@ -275,23 +275,23 @@
void setEnc(byte value) { _encbyte = value; }
- uint32 read(void *ptr, uint32 len) {
+ uint32 read(void *dataPtr, uint32 dataSize) {
// Read at most as many bytes as are still available...
- if (len > _bufSize - _pos)
- len = _bufSize - _pos;
- memcpy(ptr, _ptr, len);
+ if (dataSize > _bufSize - _pos)
+ dataSize = _bufSize - _pos;
+ memcpy(dataPtr, _ptr, dataSize);
if (_encbyte) {
- byte *p = (byte *)ptr;
- byte *end = p + len;
+ byte *p = (byte *)dataPtr;
+ byte *end = p + dataSize;
while (p < end)
*p++ ^= _encbyte;
}
- _ptr += len;
- _pos += len;
+ _ptr += dataSize;
+ _pos += dataSize;
- return len;
+ return dataSize;
}
bool eos() const { return _pos == _bufSize; }
@@ -314,14 +314,14 @@
public:
MemoryWriteStream(byte *buf, uint32 len) : _ptr(buf), _ptrOrig(buf), _bufSize(len), _pos(0) {}
- uint32 write(const void *ptr, uint32 len) {
+ uint32 write(const void *dataPtr, uint32 dataSize) {
// Write at most as many bytes as are still available...
- if (len > _bufSize - _pos)
- len = _bufSize - _pos;
- memcpy(_ptr, ptr, len);
- _ptr += len;
- _pos += len;
- return len;
+ if (dataSize > _bufSize - _pos)
+ dataSize = _bufSize - _pos;
+ memcpy(_ptr, dataPtr, dataSize);
+ _ptr += dataSize;
+ _pos += dataSize;
+ return dataSize;
}
bool eos() const { return _pos == _bufSize; }
Index: savefile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/savefile.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- savefile.cpp 22 Apr 2005 17:40:07 -0000 1.19
+++ savefile.cpp 5 May 2005 15:59:22 -0000 1.20
@@ -79,11 +79,11 @@
bool isOpen() const { return fh != 0; }
- uint32 read(void *buf, uint32 cnt) {
- return ::fread(buf, 1, cnt, fh);
+ uint32 read(void *dataPtr, uint32 dataSize) {
+ return ::fread(dataPtr, 1, dataSize, fh);
}
- uint32 write(const void *buf, uint32 cnt) {
- return ::fwrite(buf, 1, cnt, fh);
+ uint32 write(const void *dataPtr, uint32 dataSize) {
+ return ::fwrite(dataPtr, 1, dataSize, fh);
}
};
@@ -109,13 +109,13 @@
bool isOpen() const { return fh != 0; }
- uint32 read(void *buf, uint32 cnt) {
- int ret = ::gzread(fh, buf, cnt);
+ uint32 read(void *dataPtr, uint32 dataSize) {
+ int ret = ::gzread(fh, dataPtr, dataSize);
if (ret <= -1)
_ioError = true;
return ret;
}
- uint32 write(const void *buf, uint32 cnt) {
+ uint32 write(const void *dataPtr, uint32 dataSize) {
// Due to a "bug" in the zlib headers (or maybe I should say,
// a bug in the C++ spec? Whatever <g>) we have to be a bit
// hackish here and remove the const qualifier.
@@ -123,7 +123,7 @@
// which you might think is the same as "const void *" but it
// is not - rather it is equal to "void const *" which is the
// same as "void *". Hrmpf
- int ret = ::gzwrite(fh, const_cast<void *>(buf), cnt);
+ int ret = ::gzwrite(fh, const_cast<void *>(dataPtr), dataSize);
if (ret <= 0)
_ioError = true;
return ret;
More information about the Scummvm-git-logs
mailing list