[Scummvm-cvs-logs] SF.net SVN: scummvm:[46370] tools/branches/gsoc2009-gui
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Dec 13 23:21:25 CET 2009
Revision: 46370
http://scummvm.svn.sourceforge.net/scummvm/?rev=46370&view=rev
Author: fingolfin
Date: 2009-12-13 22:21:25 +0000 (Sun, 13 Dec 2009)
Log Message:
-----------
TOOLS: Change signature of File::write to match ScummVM
Modified Paths:
--------------
tools/branches/gsoc2009-gui/common/file.cpp
tools/branches/gsoc2009-gui/common/file.h
tools/branches/gsoc2009-gui/compress.cpp
tools/branches/gsoc2009-gui/compress_agos.cpp
tools/branches/gsoc2009-gui/compress_gob.cpp
tools/branches/gsoc2009-gui/compress_kyra.cpp
tools/branches/gsoc2009-gui/compress_queen.cpp
tools/branches/gsoc2009-gui/compress_saga.cpp
tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
tools/branches/gsoc2009-gui/compress_scumm_san.cpp
tools/branches/gsoc2009-gui/compress_scumm_sou.cpp
tools/branches/gsoc2009-gui/compress_sword1.cpp
tools/branches/gsoc2009-gui/compress_sword2.cpp
tools/branches/gsoc2009-gui/compress_tinsel.cpp
tools/branches/gsoc2009-gui/compress_touche.cpp
tools/branches/gsoc2009-gui/compress_tucker.cpp
tools/branches/gsoc2009-gui/encode_dxa.cpp
tools/branches/gsoc2009-gui/extract_agos.cpp
tools/branches/gsoc2009-gui/extract_cine.cpp
tools/branches/gsoc2009-gui/extract_gob_stk.cpp
tools/branches/gsoc2009-gui/extract_parallaction.cpp
tools/branches/gsoc2009-gui/extract_scumm_mac.cpp
tools/branches/gsoc2009-gui/extract_t7g_mac.cpp
tools/branches/gsoc2009-gui/kyra_pak.cpp
Modified: tools/branches/gsoc2009-gui/common/file.cpp
===================================================================
--- tools/branches/gsoc2009-gui/common/file.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/common/file.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -365,13 +365,13 @@
return fread(data, elementSize, elementCount, _file);
}
-size_t File::read(void *data, size_t bytes) {
+size_t File::read(void *dataPtr, size_t dataSize) {
if (!_file)
throw FileException("File is not open");
if ((_mode & FILEMODE_READ) == 0)
throw FileException("Tried to read from file opened in write mode (" + _name.getFullPath() + ")");
- return fread(data, 1, bytes, _file);
+ return fread(dataPtr, 1, dataSize, _file);
}
std::string File::readString() {
@@ -459,14 +459,16 @@
writeByte((uint8)(value >> 24));
}
-size_t File::write(const void *data, size_t elementSize, size_t elementCount) {
+size_t File::write(const void *dataPtr, size_t dataSize) {
if (!_file)
throw FileException("File is not open");
if ((_mode & FILEMODE_WRITE) == 0)
throw FileException("Tried to write to file opened in read mode (" + _name.getFullPath() + ")");
- size_t data_read = fwrite(data, elementSize, elementCount, _file);
- if (data_read != elementCount)
+ assert(_xormode == 0); // FIXME: This method does not work in XOR mode (and probably shouldn't)
+
+ size_t data_read = fwrite(dataPtr, 1, dataSize, _file);
+ if (data_read != dataSize)
throw FileException("Could not write to file (" + _name.getFullPath() + ")");
return data_read;
Modified: tools/branches/gsoc2009-gui/common/file.h
===================================================================
--- tools/branches/gsoc2009-gui/common/file.h 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/common/file.h 2009-12-13 22:21:25 UTC (rev 46370)
@@ -280,11 +280,11 @@
/**
* Read on a shorter form, does not throw (like readN)
*
- * @param data Where to put the data in memory.
- * @param bytes How many bytes of data to read.
- * @return Returns the amount of bytes actually 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.
*/
- size_t read(void *data, size_t bytes);
+ size_t read(void *dataPtr, size_t dataSize);
/**
* Reads a full string, until NULL or EOF
@@ -341,11 +341,11 @@
* Works the same way as fwrite, but throws on error or if
* it could not write all data.
*
- * @param data Where to read data from
- * @param elementSize the size of one element (in bytes)
- * @param elementCount the number of elements to read
+ * @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.
*/
- size_t write(const void *data, size_t elementSize, size_t elementCount);
+ size_t write(const void *dataPtr, size_t dataSize);
/**
* Works the same as fprintf
Modified: tools/branches/gsoc2009-gui/compress.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -413,8 +413,8 @@
break;
}
- outputOgg.write(og.header, 1, og.header_len);
- outputOgg.write(og.body, 1, og.body_len);
+ outputOgg.write(og.header, og.header_len);
+ outputOgg.write(og.body, og.body_len);
}
while (!eos) {
@@ -468,8 +468,8 @@
break;
}
- totalBytes += outputOgg.write(og.header, 1, og.header_len);
- totalBytes += outputOgg.write(og.body, 1, og.body_len);
+ totalBytes += outputOgg.write(og.header, og.header_len);
+ totalBytes += outputOgg.write(og.body, og.body_len);
if (ogg_page_eos(&og)) {
eos = 1;
@@ -576,7 +576,7 @@
if (size <= 0)
break;
length -= (int)size;
- f.write(fbuf, 1, size);
+ f.write(fbuf, size);
}
f.close();
@@ -655,7 +655,7 @@
}
length -= (int)size;
- f.write(fbuf, 1, size);
+ f.write(fbuf, size);
}
}
Modified: tools/branches/gsoc2009-gui/compress_agos.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_agos.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_agos.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -49,12 +49,12 @@
_input.open(TEMP_IDX, "rb");
while ((size = _input.readN(fbuf, 1, 2048)) > 0) {
- outputFile.write(fbuf, 1, size);
+ outputFile.write(fbuf, size);
}
_input.open(TEMP_DAT, "rb");
while ((size = _input.readN(fbuf, 1, 2048)) > 0) {
- outputFile.write(fbuf, 1, size);
+ outputFile.write(fbuf, size);
}
_input.close();
@@ -126,7 +126,7 @@
tot_size = 0;
while ((size = f.readN(fbuf, 1, 2048)) > 0) {
tot_size += size;
- _output_snd.write(fbuf, 1, size);
+ _output_snd.write(fbuf, size);
}
return(tot_size);
Modified: tools/branches/gsoc2009-gui/compress_gob.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_gob.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_gob.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -260,7 +260,7 @@
buffer[0] = chunkCount & 0xFF;
buffer[1] = chunkCount >> 8;
- stk.write(buffer, 1, 2);
+ stk.write(buffer, 2);
// TODO : Implement STK21
while (curChunk) {
for (i = 0; i < 13; i++)
@@ -268,7 +268,7 @@
buffer[i] = curChunk->name[i];
else
buffer[i] = '\0';
- stk.write(buffer, 1, 13);
+ stk.write(buffer, 13);
if (curChunk->packed == 2)
{
@@ -292,7 +292,7 @@
buffer[7] = curChunk->offset >> 24;
buffer[8] = curChunk->packed;
}
- stk.write(buffer, 1, 9);
+ stk.write(buffer, 9);
curChunk = curChunk->next;
}
}
@@ -311,7 +311,7 @@
do {
count = src.readN(buffer, 1, 4096);
- stk.write(buffer, 1, count);
+ stk.write(buffer, count);
tmpSize += count;
} while (count == 4096);
return tmpSize;
@@ -348,7 +348,7 @@
writeBuffer[1] = size >> 8;
writeBuffer[2] = size >> 16;
writeBuffer[3] = size >> 24;
- stk.write(writeBuffer, 1, 4);
+ stk.write(writeBuffer, 4);
// Size is already checked : small files (less than 8 characters)
// are not compressed, so copying the first three bytes is safe.
@@ -408,7 +408,7 @@
// when the 8 operation bits are set.
if ((cpt == 7) | (counter == 0)) {
writeBuffer[0] = cmd;
- stk.write(writeBuffer, 1, buffIndex);
+ stk.write(writeBuffer, buffIndex);
size += buffIndex;
buffIndex = 1;
cmd = 0;
Modified: tools/branches/gsoc2009-gui/compress_kyra.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_kyra.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_kyra.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -151,7 +151,7 @@
readSize -= read;
}
while (size > 0) {
- int written = out.write(outputBuffer, 1, size);
+ int written = out.write(outputBuffer, size);
size -= written;
}
free(outputBuffer);
@@ -243,7 +243,7 @@
}
while (outSize > 0) {
- int written = out.write(outputBuffer, 1, outSize);
+ int written = out.write(outputBuffer, outSize);
if (written <= 0)
error("[2] Couldn't write data");
outSize -= written;
Modified: tools/branches/gsoc2009-gui/compress_queen.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_queen.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_queen.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -127,7 +127,7 @@
}
amount -= numRead;
- out.write(fBuf, 1, numRead);
+ out.write(fBuf, numRead);
}
}
@@ -149,7 +149,7 @@
/* Write new header */
outFinal.writeUint32BE(QTBL);
- outFinal.write(_version->versionString, 6, 1);
+ outFinal.write(_version->versionString, 6);
outFinal.writeByte(_version->isFloppy);
outFinal.writeByte(_version->isDemo);
outFinal.writeByte(_versionExtra.compression);
@@ -306,7 +306,7 @@
}
/* Write entry to table */
- outputTbl.write(_entry.filename, 12, 1);
+ outputTbl.write(_entry.filename, 12);
outputTbl.writeByte(_entry.bundle);
outputTbl.writeUint32BE(prevOffset);
outputTbl.writeUint32BE(_entry.size);
Modified: tools/branches/gsoc2009-gui/compress_saga.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_saga.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_saga.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -187,7 +187,7 @@
error("Unable to open %s", fromFileName);
while ((size = tempf.readN(fbuf, 1, sizeof(fbuf))) > 0) {
- outputFile.write(fbuf, 1, size);
+ outputFile.write(fbuf, size);
}
size = tempf.pos();
return size;
@@ -205,7 +205,7 @@
if (size == 0) {
error("Unable to copy file");
}
- tempf.write(fbuf, 1, size);
+ tempf.write(fbuf, size);
inputSize -= size;
}
}
@@ -214,7 +214,7 @@
File tempf(toFileName, "wb");
if (!tempf.isOpen())
error("Unable to open %s", toFileName);
- tempf.write(data, 1, inputSize);
+ tempf.write(data, inputSize);
}
void CompressSaga::writeHeader(File &outputFile) {
Modified: tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_bun.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_scumm_bun.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -682,7 +682,7 @@
wav[43] = (s_size >> 24) & 0xff;
_waveTmpFile.seek(0, SEEK_SET);
- if (_waveTmpFile.write(wav, 1, 44) != 44) {
+ if (_waveTmpFile.write(wav, 44) != 44) {
error("error writing temp wave file");
}
_waveTmpFile.close();
@@ -693,7 +693,7 @@
_waveTmpFile.open(fileName, "wb");
byte wav[44];
memset(wav, 0, 44);
- _waveTmpFile.write(output_data, 1, 44);
+ _waveTmpFile.write(output_data, 44);
_waveDataSize = 0;
}
for (unsigned int j = 0; j < size - 1; j += 2) {
@@ -701,7 +701,7 @@
output_data[j + 0] = output_data[j + 1];
output_data[j + 1] = tmp;
}
- _waveTmpFile.write(output_data, 1, size);
+ _waveTmpFile.write(output_data, size);
_waveDataSize += size;
}
@@ -920,7 +920,7 @@
cmpFile.close();
unlink(tmpPath);
- output.write(tmpBuf, size, 1);
+ output.write(tmpBuf, size);
free(tmpBuf);
_cbundleTable[_cbundleCurIndex].size = output.pos() - startPos;
_cbundleCurIndex++;
@@ -1047,13 +1047,13 @@
}
for (l = 0; l < numSyncs; l++) {
output.writeUint32BE(sync[l].size);
- output.write(sync[l].ptr, sync[l].size, 1);
+ output.write(sync[l].ptr, sync[l].size);
free(sync[l].ptr);
}
for (l = 0; l < numMarkers; l++) {
output.writeUint32BE(marker[l].pos);
output.writeUint32BE(marker[l].length);
- output.write(marker[l].ptr, marker[l].length, 1);
+ output.write(marker[l].ptr, marker[l].length);
delete[] marker[l].ptr;
}
free(region);
@@ -1143,7 +1143,7 @@
int32 curPos = output.pos();
for (int i = 0; i < _cbundleCurIndex; i++) {
- output.write(_cbundleTable[i].filename, 24, 1);
+ output.write(_cbundleTable[i].filename, 24);
output.writeUint32BE(_cbundleTable[i].offset);
output.writeUint32BE(_cbundleTable[i].size);
}
Modified: tools/branches/gsoc2009-gui/compress_scumm_san.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_san.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_scumm_san.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -86,7 +86,7 @@
wav[43] = (s_size >> 24) & 0xff;
_waveTmpFile.seek(0, SEEK_SET);
- _waveTmpFile.write(wav, 1, 44);
+ _waveTmpFile.write(wav, 44);
}
void CompressScummSan::writeToTempWaveFile(char *fileName, byte *output_data, unsigned int size) {
if (!_waveTmpFile.isOpen()) {
@@ -96,7 +96,7 @@
}
byte wav[44];
memset(wav, 0, 44);
- _waveTmpFile.write(output_data, 1, 44);
+ _waveTmpFile.write(output_data, 44);
_waveDataSize = 0;
}
for (unsigned int j = 0; j < size - 1; j += 2) {
@@ -105,7 +105,7 @@
output_data[j + 1] = tmp;
}
- _waveTmpFile.write(output_data, 1, size);
+ _waveTmpFile.write(output_data, size);
_waveDataSize += size;
}
@@ -299,7 +299,7 @@
free(audioBuf);
_audioTracks[l].file.open(filename, "wb");
- _audioTracks[l].file.write(outputBuf, outputSize, 1);
+ _audioTracks[l].file.write(outputBuf, outputSize);
free(outputBuf);
}
}
@@ -384,7 +384,7 @@
offset += length;
}
wavFile.seek(44 + (frameAudioSize * _audioTracks[l].animFrame), SEEK_SET);
- wavFile.write(wavBuf, fileSize, 1);
+ wavFile.write(wavBuf, fileSize);
free(wavBuf);
free(tmpBuf);
@@ -511,7 +511,7 @@
}
byte *buffer = (byte *)malloc(size);
input.read(buffer, size, 1);
- audioTrack->file.write(buffer, size, 1);
+ audioTrack->file.write(buffer, size);
free(buffer);
audioTrack->volumes[index] = volume;
audioTrack->pans[index] = pan;
Modified: tools/branches/gsoc2009-gui/compress_scumm_sou.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_sou.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_scumm_sou.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -53,12 +53,12 @@
File in(TEMP_IDX, "rb");
while ((size = in.readN(buf, 1, 2048)) > 0) {
- _output_idx.write(buf, 1, size);
+ _output_idx.write(buf, size);
}
in.open(TEMP_DAT, "rb");
while ((size = in.readN(buf, 1, 2048)) > 0) {
- _output_idx.write(buf, 1, size);
+ _output_idx.write(buf, size);
}
in.close();
_output_idx.close();
@@ -127,7 +127,7 @@
tot_size = 0;
while ((size = f.readN(buf, 1, 2048)) > 0) {
tot_size += size;
- _output_snd.write(buf, 1, size);
+ _output_snd.write(buf, size);
}
_output_idx.writeUint32BE(tot_size);
Modified: tools/branches/gsoc2009-gui/compress_sword1.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword1.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_sword1.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -353,7 +353,8 @@
uint32 size;
File temp(TEMP_RAW, "wb");
- assert(temp.write(rawData, 1, rawSize) == rawSize);
+ size = temp.write(rawData, rawSize);
+ assert(size == rawSize);
encodeAudio(TEMP_RAW, true, 11025, _audioOuputFilename.c_str(), _format);
temp.open(_audioOuputFilename, "rb");
temp.seek(0, SEEK_END);
@@ -414,7 +415,7 @@
mp3Data = convertData(smpData, smpSize, &mp3Size);
cl3Index[cnt << 1] = cl3.pos();
cl3Index[(cnt << 1) | 1] = mp3Size;
- cl3.write(mp3Data, 1, mp3Size);
+ cl3.write(mp3Data, mp3Size);
free(smpData);
free(mp3Data);
Modified: tools/branches/gsoc2009-gui/compress_sword2.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword2.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_sword2.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -40,7 +40,7 @@
}
length -= size;
- f1.write(fbuf, 1, size);
+ f1.write(fbuf, size);
}
return orig_length;
}
Modified: tools/branches/gsoc2009-gui/compress_tinsel.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_tinsel.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_tinsel.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -79,7 +79,7 @@
if (doneRead <= 0)
break;
copyLeft -= (int)doneRead;
- curFileHandle.write(buffer, 1, doneRead);
+ curFileHandle.write(buffer, doneRead);
}
curFileHandle.close();
@@ -100,7 +100,7 @@
if (doneRead <= 0)
break;
copyLeft -= (int)doneRead;
- _output_smp.write(buffer, 1, doneRead);
+ _output_smp.write(buffer, doneRead);
}
}
@@ -225,7 +225,7 @@
unlink(TEMP_ENC);
curFileHandle.open(TEMP_RAW, "wb");
- curFileHandle.write(outBuffer, 1, decodedCount*2);
+ curFileHandle.write(outBuffer, decodedCount*2);
free(inBuffer);
free(outBuffer);
@@ -247,7 +247,7 @@
if (doneRead <= 0)
break;
copyLeft -= (int)doneRead;
- _output_smp.write(buffer, 1, doneRead);
+ _output_smp.write(buffer, doneRead);
}
}
Modified: tools/branches/gsoc2009-gui/compress_touche.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_touche.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_touche.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -94,7 +94,7 @@
size_table[i] = 0;
while ((size = temp.readN(buf, 1, 2048)) > 0) {
- output.write(buf, 1, size);
+ output.write(buf, size);
size_table[i] += size;
}
Modified: tools/branches/gsoc2009-gui/compress_tucker.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_tucker.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/compress_tucker.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -56,7 +56,7 @@
File input_temp(tempEncoded, "rb");
while ((sz = input_temp.readN(buf, 1, sizeof(buf))) > 0) {
- if ((sz = output.write(buf, 1, sz)) > 0) {
+ if ((sz = output.write(buf, sz)) > 0) {
compress_sz += sz;
}
}
Modified: tools/branches/gsoc2009-gui/encode_dxa.cpp
===================================================================
--- tools/branches/gsoc2009-gui/encode_dxa.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/encode_dxa.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -130,7 +130,7 @@
if (_framecount == 0 || memcmp(_prevpalette, palette, 768)) {
_dxa.writeUint32LE(typeCMAP);
- _dxa.write(palette, 768, 1);
+ _dxa.write(palette, 768);
memcpy(_prevpalette, palette, 768);
} else {
writeNULL();
@@ -156,7 +156,7 @@
compress2(outbuf, &outsize, frame, _width * _workheight, 9);
_dxa.writeByte(compType);
_dxa.writeUint32BE(outsize);
- _dxa.write(outbuf, outsize, 1);
+ _dxa.write(outbuf, outsize);
delete[] outbuf;
break;
}
@@ -217,7 +217,7 @@
_dxa.writeByte(compType);
_dxa.writeUint32BE(frameoutsize);
- _dxa.write(frameoutbuf, frameoutsize, 1);
+ _dxa.write(frameoutbuf, frameoutsize);
delete[] xorbuf_z;
delete[] rawbuf_z;
Modified: tools/branches/gsoc2009-gui/extract_agos.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_agos.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/extract_agos.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -204,7 +204,7 @@
*/
void ExtractAgos::savefile(const Filename &name, void *mem, size_t length) {
File file(name, FILEMODE_WRITE);
- file.write(mem, 1, length);
+ file.write(mem, length);
}
#ifdef STANDALONE_MAIN
Modified: tools/branches/gsoc2009-gui/extract_cine.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_cine.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/extract_cine.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -211,7 +211,7 @@
memcpy(data, packedData, packedSize);
}
free(packedData);
- fpOut.write(data, unpackedSize, 1);
+ fpOut.write(data, unpackedSize);
free(data);
if (!status) {
Modified: tools/branches/gsoc2009-gui/extract_gob_stk.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_gob_stk.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/extract_gob_stk.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -276,11 +276,11 @@
unpackedData = unpackData(data, realSize);
}
- chunkFile.write(unpackedData, realSize, 1);
+ chunkFile.write(unpackedData, realSize);
delete[] unpackedData;
} else {
- chunkFile.write(data, curChunk->size, 1);
+ chunkFile.write(data, curChunk->size);
}
} catch(...) {
delete[] data;
Modified: tools/branches/gsoc2009-gui/extract_parallaction.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_parallaction.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/extract_parallaction.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -335,7 +335,7 @@
outpath.setFullName(filename);
File ofile(outpath, "wb");
- ofile.write(arc._fileData, 1, arc._fileSize);
+ ofile.write(arc._fileData, arc._fileSize);
}
}
Modified: tools/branches/gsoc2009-gui/extract_scumm_mac.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_scumm_mac.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/extract_scumm_mac.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -139,7 +139,7 @@
}
ifp.read(buf, 1, file_len);
- ofp.write(buf, 1, file_len);
+ ofp.write(buf, file_len);
free(buf);
}
}
Modified: tools/branches/gsoc2009-gui/extract_t7g_mac.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_t7g_mac.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/extract_t7g_mac.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -60,7 +60,7 @@
// Dump the resource to the output file
File out(name, "wb");
infile.read(buf, 1, fileSize);
- out.write(buf, 1, fileSize);
+ out.write(buf, fileSize);
} catch (...) {
delete[] buf;
throw;
Modified: tools/branches/gsoc2009-gui/kyra_pak.cpp
===================================================================
--- tools/branches/gsoc2009-gui/kyra_pak.cpp 2009-12-13 22:06:45 UTC (rev 46369)
+++ tools/branches/gsoc2009-gui/kyra_pak.cpp 2009-12-13 22:21:25 UTC (rev 46370)
@@ -146,17 +146,17 @@
f.writeUint32BE(curAddr);
else
f.writeUint32LE(curAddr);
- f.write(cur->filename, 1, strlen(cur->filename) + 1);
+ f.write(cur->filename, strlen(cur->filename) + 1);
curAddr += cur->size;
}
if (_isAmiga)
f.writeUint32BE(curAddr);
else
f.writeUint32LE(curAddr);
- f.write(zeroName, 1, 5);
+ f.write(zeroName, 5);
for (FileList *cur = _fileList; cur; cur = cur->next)
- f.write(cur->data, 1, cur->size);
+ f.write(cur->data, cur->size);
return true;
}
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