[Scummvm-cvs-logs] SF.net SVN: scummvm:[40868] tools/trunk

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun May 24 17:19:28 CEST 2009


Revision: 40868
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40868&view=rev
Author:   lordhoto
Date:     2009-05-24 15:19:28 +0000 (Sun, 24 May 2009)

Log Message:
-----------
Strip trailing whitespaces.

Modified Paths:
--------------
    tools/trunk/compress.cpp
    tools/trunk/compress_gob.cpp
    tools/trunk/compress_kyra.cpp
    tools/trunk/compress_saga.cpp
    tools/trunk/compress_tucker.cpp
    tools/trunk/decine.cpp
    tools/trunk/degob_script.cpp
    tools/trunk/degob_script_v1.cpp
    tools/trunk/degob_script_v2.cpp
    tools/trunk/descumm6.cpp
    tools/trunk/extract_cine.cpp
    tools/trunk/extract_cine.h
    tools/trunk/extract_gob_stk.cpp
    tools/trunk/extract_kyra.h
    tools/trunk/extract_parallaction.cpp
    tools/trunk/extract_zak_c64.cpp
    tools/trunk/kyra_ins.cpp
    tools/trunk/kyra_pak.cpp
    tools/trunk/sci/sfx/tests/tests.cpp
    tools/trunk/tools_gui.cpp
    tools/trunk/tools_gui.h
    tools/trunk/util.h
    tools/trunk/utils/adpcm.cpp
    tools/trunk/utils/md5.cpp
    tools/trunk/utils/stream.h
    tools/trunk/utils/util.h

Modified: tools/trunk/compress.cpp
===================================================================
--- tools/trunk/compress.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/compress.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -794,7 +794,7 @@
 			}
 
 			if (oggparms.minBitr < 8) {
-				oggparms.minBitr = 8;		
+				oggparms.minBitr = 8;
 			}
 
 			i++;

Modified: tools/trunk/compress_gob.cpp
===================================================================
--- tools/trunk/compress_gob.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/compress_gob.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -111,7 +111,7 @@
 	while (!feof(gobConf)) {
 		strcpy(curChunk->name, buffer);
 		fscanf(gobConf, "%s", buffer);
-		if (strcmp(buffer, "1") == 0) 
+		if (strcmp(buffer, "1") == 0)
 			curChunk->packed = true;
 		else
 			curChunk->packed = false;
@@ -161,7 +161,7 @@
 			} while (count == 4096);
 			curChunk->size = tmpSize;
 		}
-		
+
 //		printf("File: %s inside STK size: %d original size: %d\n", curChunk->name, curChunk->size, realSize);
 		fclose(src);
 		curChunk = curChunk->next;
@@ -195,7 +195,7 @@
 //	The structure of the header is the following :
 //+ 2 bytes : numbers of files archived in the .stk/.itk
 //	Then, for each files :
-//+ 13 bytes : the filename, terminated by '\0'. In original, there's 
+//+ 13 bytes : the filename, terminated by '\0'. In original, there's
 //  garbage after if the filename has not the maximum length
 //+ 4  bytes : size of the chunk
 //+ 4  bytes : start position of the chunk in the file
@@ -213,7 +213,7 @@
 			else
 				buffer[i] = '\0';
 		fwrite(buffer, 1, 13, stk);
-		
+
 		buffer[0] = curChunk->size;
 		buffer[1] = curChunk->size >> 8;
 		buffer[2] = curChunk->size >> 16;
@@ -352,7 +352,7 @@
 			bestPos = tmpPos;
 		}
 
-		if (bestLength == 8) 
+		if (bestLength == 8)
 			break;
 	}
 

Modified: tools/trunk/compress_kyra.cpp
===================================================================
--- tools/trunk/compress_kyra.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/compress_kyra.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -79,7 +79,7 @@
 	if (scumm_stricmp(inputFile, outputFile) == 0)
 		error("infile and outfile are the same file");
 
-	bool isKyra3 = detectKyra3File(inputFile); 
+	bool isKyra3 = detectKyra3File(inputFile);
 	if (!isKyra3)
 		process(inputFile, outputFile);
 	else

Modified: tools/trunk/compress_saga.cpp
===================================================================
--- tools/trunk/compress_saga.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/compress_saga.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -173,7 +173,7 @@
 					printf("Matched game: Inherit the Earth: Quest for the Orb\n");
 					return true;
 				}
-			} else {			// IHNM			
+			} else {			// IHNM
 				// Filename based detection, used in IHNM, as all its sound files have the
 				// same encoding
 

Modified: tools/trunk/compress_tucker.cpp
===================================================================
--- tools/trunk/compress_tucker.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/compress_tucker.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -126,7 +126,7 @@
 	current_offset = 0;
 	for (i = 0; i < dir->count; ++i) {
 		temp_table[i].offset = current_offset;
-		sprintf(filename, dir->fmt, i);	
+		sprintf(filename, dir->fmt, i);
 		input = fopen(filepath, "rb");
 		if (input) {
 			temp_table[i].size = compress_file_wav(input, output);
@@ -405,7 +405,7 @@
 		temp_table[i].offset = current_offset;
 		switch (index) {
 		case 0: /* .wav */
-			sprintf(filepath, "%s/audio/%s", g_input_directory, audio_wav_fileslist[i]);	
+			sprintf(filepath, "%s/audio/%s", g_input_directory, audio_wav_fileslist[i]);
 			input = fopen(filepath, "rb");
 			if (!input) {
 				error("Can't open file '%s'", filepath);
@@ -414,7 +414,7 @@
 			fclose(input);
 			break;
 		case 1: /* .raw */
-			is_16LE = bsearch(audio_raw_fileslist[i], audio_raw_fileslist_16LE, 
+			is_16LE = bsearch(audio_raw_fileslist[i], audio_raw_fileslist_16LE,
 				ARRAYSIZE(audio_raw_fileslist_16LE), sizeof(const char *), cmp_helper) != NULL;
 			temp_table[i].offset = current_offset;
 			sprintf(filepath, "%s/audio/%s", g_input_directory, audio_raw_fileslist[i]);

Modified: tools/trunk/decine.cpp
===================================================================
--- tools/trunk/decine.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/decine.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -66,7 +66,7 @@
 static bool decodeOpcode(int isV2) {
 	uint8 opcode;
 	unsigned int addr = _scriptData - _baseScriptData;
-	
+
 	opcode = fetchScriptByte();
 	if (opcode == 0) {
 		printf("[%04X] (FF) ", addr);
@@ -88,7 +88,7 @@
 				uint8 var = fetchScriptByte();
 				if (field >= 7) return false;
 				printf("LOAD localvars[%d], object[%d].%s", var, num, objectField[field]);
-			}		
+			}
 			break;
 		case 0x02: {
 				uint8 num = fetchScriptByte();
@@ -238,7 +238,7 @@
 		case 0x0F: {
 				uint8 num = fetchScriptByte();
 				uint8 field = fetchScriptByte();
-				int16 var = fetchScriptByte();				
+				int16 var = fetchScriptByte();
 				if (field >= 7) return false;
 				printf("SET object[%d].%s, localvars[%d]", num, objectField[field], var);
 			}
@@ -407,7 +407,7 @@
 				uint8 type = fetchScriptByte();
 				printf("ROTATE_PALETTE first_color=%d, end_color=%d, type=%d", firstColor, endColor, type);
 			}
-			break;			
+			break;
 		case 0x4F: {
 				printf("BREAK");
 			}
@@ -425,7 +425,7 @@
 				int16 color = fetchScriptWord();
 				printf("ADD_MESSAGE num=%d x=%d y=%d width=%d color=%d", num, x, y, width, color);
 			}
-			break;		
+			break;
 		case 0x52: {
 				uint8 var = fetchScriptByte();
 				uint8 type = fetchScriptByte();
@@ -478,12 +478,12 @@
 				int16 value = fetchScriptWord();
 				printf("SET zones[%d], %d", num, value);
 			}
-			break;			
+			break;
 		case 0x68: {
 				uint8 color = fetchScriptByte();
 				printf("SET_MENU_COLOR_2 %d", color);
 			}
-			break;		
+			break;
 		case 0x69: {
 				printf("ENABLE_PLAYER_INPUT");
 			}
@@ -514,7 +514,7 @@
 				printf("STOP_MUSIC");
 			}
 			break;
-		case 0x77: 
+		case 0x77:
 		case 0x78: {
 				uint8 frame = fetchScriptByte();
 				uint8 channel = fetchScriptByte();
@@ -550,7 +550,7 @@
 				int16 f = fetchScriptWord();
 				int16 g = fetchScriptWord();
 				printf("ADD_ANIM_SEQUENCE %d %d %d %d %d %d %d", a, b, c, d, e, f, g);
-			}			
+			}
 			break;
 		case 0x80:
 			assert(isV2); {
@@ -568,12 +568,12 @@
 				uint8 e = fetchScriptByte();
 				printf("OP_0x82 %d %d %d %d %d", a, b, c, d, e);
 			}
-			break;			
+			break;
 		case 0x83:
 			assert(isV2); {
 				uint8 a = fetchScriptByte();
 				uint8 b = fetchScriptByte();
-				printf("IS_ANIM_SEQUENCE_PLAYING %d %d", a, b);				
+				printf("IS_ANIM_SEQUENCE_PLAYING %d %d", a, b);
 			}
 			break;
 		case 0x84:
@@ -585,15 +585,15 @@
 		case 0x85:
 			assert(isV2); {
 				uint8 num = fetchScriptByte();
-				printf("JUMP GEQ LABEL_%d", num);	
+				printf("JUMP GEQ LABEL_%d", num);
 			}
-			break;	
+			break;
 		case 0x86:
 			assert(isV2); {
 				uint8 num = fetchScriptByte();
 				printf("JUMP L LABEL_%d", num);
 			}
-			break;		
+			break;
 		case 0x88:
 			assert(isV2); {
 				uint8 num = fetchScriptByte();
@@ -658,7 +658,7 @@
 			}
 			break;
 		case 0x9A:
-			assert(isV2); {				
+			assert(isV2); {
 				uint8 a = fetchScriptByte();
 				printf("OP_0x9A %d", a);
 			}
@@ -780,7 +780,7 @@
 	if (num >= 256) {
 		printf("// Number of scripts (%d) in REL-file is too large (i.e. >= 256)\n\n", num);
 		return;
-	}	
+	}
 	for (i = 0; i < num; ++i) {
 		hdr[i].size = READ_BE_UINT16(data); data += 2;
 		hdr[i].param1 = READ_BE_UINT16(data); data += 2;
@@ -819,7 +819,7 @@
 		uint8 *data;
 		int dataSize, isV2;
 		DecodeFile decodeFile;
-		
+
 		if (strcmp(argv[1], "-prc") == 0) {
 			decodeFile = decodePrc;
 		}  else if (strcmp(argv[1], "-rel") == 0) {
@@ -827,7 +827,7 @@
 		} else {
 			return showUsage();
 		}
-		
+
 		if (strcmp(argv[2], "-v1") == 0) {
 			isV2 = 0;
 		}  else if (strcmp(argv[2], "-v2") == 0) {
@@ -835,7 +835,7 @@
 		} else {
 			return showUsage();
 		}
-		
+
 		fp = fopen(argv[3], "rb");
 		if (fp) {
 			fseek(fp, 0, SEEK_END);

Modified: tools/trunk/degob_script.cpp
===================================================================
--- tools/trunk/degob_script.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/degob_script.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -304,7 +304,7 @@
 
 			case 15:
 				skip(2);
-								
+
 			case 16:
 			case 26:
 			case 27:

Modified: tools/trunk/degob_script_v1.cpp
===================================================================
--- tools/trunk/degob_script_v1.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/degob_script_v1.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -1035,7 +1035,7 @@
 	// Statics
 	for (int i = 0; i < count1; i++, data += 14) {
 		int16 sSize;
-		
+
 		readExpr();
 		sSize = (int16) readUint16();
 		skip(sSize * 2);

Modified: tools/trunk/degob_script_v2.cpp
===================================================================
--- tools/trunk/degob_script_v2.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/degob_script_v2.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -801,7 +801,7 @@
 	// Statics
 	for (int i = 0; i < count1; i++, data += 14) {
 		int16 sSize;
-		
+
 		readExpr();
 		sSize = (int16) readUint16();
 		skip(sSize * 2);

Modified: tools/trunk/descumm6.cpp
===================================================================
--- tools/trunk/descumm6.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/descumm6.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -1567,7 +1567,7 @@
 		ext(output, "pp|faceActor");
 		break;
 
-	case 0x03: 
+	case 0x03:
 		ext(output, "x" "sortArray\0"
 				"\x86pppppw|sort,");
 		break;
@@ -2056,7 +2056,7 @@
 	case 0x66:
 		ext(output, "|stopObjectCode");
 		break;
-	case 0x67: 
+	case 0x67:
 		ext(output, "p|localizeArrayToRoom");
 		break;
 	case 0x68:
@@ -5329,7 +5329,7 @@
 					"\x4Bs|msg,"
 					"\xFEp|begin,"
 					"\xFF|end");
-		} 
+		}
 		break;
 	case 0xB9:
 		if (g_options.heVersion)

Modified: tools/trunk/extract_cine.cpp
===================================================================
--- tools/trunk/extract_cine.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/extract_cine.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -166,20 +166,20 @@
 		fileName[14] = '\0';
 		sprintf(filePath, "%s/%s", outDir, fileName);
 		FILE *fpOut = fopen(filePath, "wb");
-		
+
 		uint32 offset = readUint32BE(fp);
 		unsigned int packedSize = readUint32BE(fp);
 		unsigned int unpackedSize = readUint32BE(fp);
 		readUint32BE(fp);
 		unsigned int savedPos = ftell(fp);
-		
+
 		if (!fpOut) {
 			printf("ERROR: unable to open '%s' for writing\n", filePath);
 			continue;
 		}
-		printf("unpacking '%s' ... ", filePath);		
-		
-		fseek(fp, offset, SEEK_SET);		
+		printf("unpacking '%s' ... ", filePath);
+
+		fseek(fp, offset, SEEK_SET);
 		assert(unpackedSize >= packedSize);
 		uint8 *data = (uint8 *)calloc(unpackedSize, 1);
 		uint8 *packedData = (uint8 *)calloc(packedSize, 1);
@@ -197,7 +197,7 @@
 		fwrite(data, unpackedSize, 1, fpOut);
 		fclose(fpOut);
 		free(data);
-		
+
 		if (!status) {
 			printf("CRC ERROR");
 		} else {
@@ -210,11 +210,11 @@
 
 void fixVolCnfFileName(char *dst, const uint8 *src) {
 	char *ext, *end;
-	
+
 	memcpy(dst, src, 8);
 	src += 8;
-	dst[8] = 0;	
-	ext = strchr(dst, ' ');	
+	dst[8] = 0;
+	ext = strchr(dst, ' ');
 	if (!ext) {
 		ext = &dst[8];
 	}
@@ -231,13 +231,13 @@
 	}
 }
 
-void unpackAllResourceFiles(const char *filename, const char *outDir) { 
+void unpackAllResourceFiles(const char *filename, const char *outDir) {
 	FILE *fp = fopen(filename, "rb");
 	if (!fp) {
 		printf("Unable to open file '%s'\n", filename);
 		exit(1);
 	}
-	
+
 	uint32 unpackedSize, packedSize;
 	{
 		char header[8];
@@ -292,7 +292,7 @@
 int main(int argc, char *argv[]) {
 	int i;
 	char tmp[512];
-	
+
 	if (argc == 3) {
 		strcpy(tmp, argv[1]);
 		for (i = 0; tmp[i] != 0; i++) {

Modified: tools/trunk/extract_cine.h
===================================================================
--- tools/trunk/extract_cine.h	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/extract_cine.h	2009-05-24 15:19:28 UTC (rev 40868)
@@ -48,7 +48,7 @@
 	/**
 	 * Get bits from the source stream.
 	 * @note Changes the bit position in the source stream.
-	 * @param numBits Number of bits to read from the source stream.	 
+	 * @param numBits Number of bits to read from the source stream.
 	 * @return Integer value consisting of the bits read from the source stream (In range [0, (2 ** numBits) - 1]).
 	 * @return Later the bit was read from the source, the less significant it is in the return value.
 	 */

Modified: tools/trunk/extract_gob_stk.cpp
===================================================================
--- tools/trunk/extract_gob_stk.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/extract_gob_stk.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -74,7 +74,7 @@
 
 	if (fread(signature, 1, 6, stk) < 6)
 		error("Unexpected EOF while reading signature in \"%s\"", argv[1]);
-	
+
 	if (strncmp(signature, "STK2.1", 6) == 0) {
 		warning("Signature of new STK format (STK 2.1) detected in file \"%s\"", argv[1]);
 		fprintf(gobConf, "%s\n", confSTK21);
@@ -109,7 +109,7 @@
 	uint16 numDataChunks = readUint16LE(stk);
 	Chunk *chunks = new Chunk;
 	Chunk *curChunk = chunks;
-	char *fakeTotPtr; 
+	char *fakeTotPtr;
 
 	while (numDataChunks-- > 0) {
 		if (fread(curChunk->name, 1, 13, stk) < 13)
@@ -145,8 +145,8 @@
 	Chunk *chunks = new Chunk;
 	Chunk *curChunk = chunks;
 
-//	char *fakeTotPtr; 
-	
+//	char *fakeTotPtr;
+
 	int cpt = 0;
 	char buffer[64];
 	char debugStr[256];
@@ -155,7 +155,7 @@
 	uint32 filePos;
 	uint32 compressFlag;
 	uint32 decompSize;
-	
+
 	// Header (Signature already read)
 	// ======
 	// Structure of header is :
@@ -164,7 +164,7 @@
 	// + 08 bytes : Name / acronym of STK/ITK creator
 	// + 04 bytes : Start position of Filenames Section
 
-	if (fread(buffer, 1, 14, stk) < 14) 
+	if (fread(buffer, 1, 14, stk) < 14)
 		extractError(stk, gobConf, chunks, "Unexpected EOF");
 
 	buffer[14] = '\0';
@@ -189,7 +189,7 @@
 
 	numDataChunks = readUint32LE(stk);
 	miscPos = readUint32LE(stk);
-	
+
 	if (numDataChunks == 0)
 		extractError(stk, gobConf, chunks, "Empty ITK/STK !");
 
@@ -212,7 +212,7 @@
 		if (fseek(stk, miscPos + (cpt * 61), SEEK_SET) != 0)
 			extractError(stk, gobConf, chunks, "Unable to locate Misc Section");
 		filenamePos = readUint32LE(stk);
-		
+
 		if (fread(buffer, 1, 36, stk) < 36)
 			extractError(stk, gobConf, chunks, "Unexpected EOF in Misc Section");
 		curChunk->size = readUint32LE(stk);
@@ -244,7 +244,7 @@
 
 		if (fseek(stk, filenamePos, SEEK_SET) != 0)
 			extractError(stk, gobConf, chunks, "Unable to locate filename");
-		
+
 		if (fgets(curChunk->name, 64, stk) == 0)
 			extractError(stk, gobConf, chunks, "Unable to read filename");
 
@@ -330,7 +330,7 @@
 		tmpBuf[i] = 0x20;
 	tmpIndex = 4078;
 
-	src += 4; 
+	src += 4;
 
 	byte *unpacked = new byte[size];
 	byte *dest = unpacked;
@@ -406,7 +406,7 @@
 		tmpBuf[i] = 0x20;
 	tmpIndex = 4078;
 
-	src += 4; 
+	src += 4;
 	newCounter -= 4;
 
 	byte *unpacked = new byte[500000];//[size] Replaced by dummy as real size is not always known;
@@ -422,7 +422,7 @@
 			if (newCounter == 0)
 				break;
 		}
-		
+
 		if ((cmd & 1) != 0) { /* copy */
 			*dest++ = *src;
 			size++;

Modified: tools/trunk/extract_kyra.h
===================================================================
--- tools/trunk/extract_kyra.h	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/extract_kyra.h	2009-05-24 15:19:28 UTC (rev 40868)
@@ -31,7 +31,7 @@
 
 	virtual void drawFileList();
 
-	virtual bool outputAllFiles() { return outputAllFiles("./"); } 
+	virtual bool outputAllFiles() { return outputAllFiles("./"); }
 	virtual bool outputAllFiles(const char *outputPath);
 
 	virtual bool outputFile(const char *file) { return outputFileAs(file, file); }

Modified: tools/trunk/extract_parallaction.cpp
===================================================================
--- tools/trunk/extract_parallaction.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/extract_parallaction.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -276,7 +276,7 @@
 			/* and maybe a bigger offset */
 			if (get_bits(1) == 0)
 				offset = get_bits(7);
-			else 
+			else
 				offset = get_bits(n_bits);
 
 			do {

Modified: tools/trunk/extract_zak_c64.cpp
===================================================================
--- tools/trunk/extract_zak_c64.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/extract_zak_c64.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -66,7 +66,7 @@
 	}
 
 	getPath(argv[argc - 1], inputPath);
-	if (!(input1 = fopen(argv[1],"rb"))) 
+	if (!(input1 = fopen(argv[1],"rb")))
 		error("Unable to open file %s for input!",argv[1]);
 	if (!(input2 = fopen(argv[2],"rb")))
 		error("Unable to open file %s for input!",argv[2]);

Modified: tools/trunk/kyra_ins.cpp
===================================================================
--- tools/trunk/kyra_ins.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/kyra_ins.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -47,7 +47,7 @@
 };
 
 void FileExpanderSource::advSrcBitsBy1() {
-	_key >>= 1;		
+	_key >>= 1;
 	if (!--_bitsLeft) {
 		if (_dataPtr < _endofBuffer)
 			_key = ((*_dataPtr++) << 8 ) | (_key & 0xff);
@@ -75,7 +75,7 @@
 
 	if (_index > 8) {
 		newIndex = _index - 8;
-		res = (_key & 0xff) & mskTable[8];		
+		res = (_key & 0xff) & mskTable[8];
 		advSrcBitsByIndex(8);
 		_index = newIndex;
 		res |= (((_key & 0xff) & mskTable[_index]) << 8);
@@ -162,7 +162,7 @@
 		0x10, 0x11, 0x12, 0x00, 0x08, 0x07, 0x09, 0x06, 0x0A,
 		0x05, 0x0B, 0x04, 0x0C, 0x03, 0x0D, 0x02, 0x0E, 0x01, 0x0F
 	};
-	
+
 	memset(_tables[0], 0, 3914);
 
 	uint8 *d = dst;
@@ -187,10 +187,10 @@
 			tableSize0 = _src->getKeyMasked(5) + 257;
 			tableSize1 = _src->getKeyMasked(5) + 1;
 			memset(_tables[7], 0, 19);
-				
+
 			const uint8 *itbl = indexTable;
 			int numbytes = _src->getKeyMasked(4) + 4;
-			
+
 			while (numbytes--)
 				_tables[7][*itbl++] = _src->getKeyMasked(3);
 
@@ -211,7 +211,7 @@
 					uint8 tmpI = 0;
 					if (cmd == 16) {
 						cmd = _src->getKeyMasked(2) + 3;
-						tmpI = *(tmp - 1);							
+						tmpI = *(tmp - 1);
 					} else if (cmd == 17) {
 						cmd = _src->getKeyMasked(3) + 3;
 					} else {
@@ -226,7 +226,7 @@
 						error("decompression failure");
 				}
 			}
-				
+
 			memcpy(_tables[1], _tables[0] + tableSize0, tableSize1);
 			generateTables(0, 2, 3, tableSize0);
 			generateTables(1, 4, 5, tableSize1);
@@ -236,7 +236,7 @@
 			postprocess = false;
 			needrefresh = true;
 		} else if (mode == 0){
-			uint8 *d2 = _tables[0];			
+			uint8 *d2 = _tables[0];
 			memset(d2, 8, 144);
 			memset(d2 + 144, 9, 112);
 			memset(d2 + 256, 7, 24);
@@ -255,9 +255,9 @@
 
 		if (!postprocess)
 			continue;
-		
+
 		int16 cmd = 0;
-		
+
 		do  {
 			cmd = ((int16*) _tables[2])[_src->getKeyLower()];
 			_src->advSrcBitsByIndex(cmd < 0 ? calcCmdAndIndex(_tables[3], cmd) : _tables[0][cmd]);
@@ -318,8 +318,8 @@
 
 	const uint8 *s = tbl1;
 	memset(_tables16[0], 0, 32);
-	
-	for (int i = 0; i < cnt; i++) 
+
+	for (int i = 0; i < cnt; i++)
 		_tables16[0][(*s++)]++;
 
 	_tables16[1][1] = 0;
@@ -355,12 +355,12 @@
 		if (t > 0) {
 			uint16 v1 = *d;
 			uint16 v2 = 0;
-			
+
 			do {
 				v2 = (v2 << 1) | (v1 & 1);
 				v1 >>= 1;
 			} while (--t && v1);
-			
+
 			t++;
 			uint8 c1 = (v1 & 1);
 			while (t--) {
@@ -372,7 +372,7 @@
 			*d++ = v2;
 		} else {
 			d++;
-		}		
+		}
 	}
 
 	memset((void*) tbl2, 0, 512);
@@ -391,7 +391,7 @@
 		if (t && t < 9) {
 			inc = 1 << t;
 			uint16 o = *d;
-			
+
 			do {
 				s2[o] = cnt;
 				o += inc;
@@ -421,7 +421,7 @@
 			} while (--t);
 			*s2 = cnt;
 		}
-		d--;		
+		d--;
 	} while (--cnt >= 0);
 }
 
@@ -498,7 +498,7 @@
 		bytesleft -= cs;
 
 		fclose(file);
-		
+
 		pos += cs;
 		if (cs == size) {
 			if (!bytesleft) {
@@ -552,7 +552,7 @@
 			}
 
 			uint32 size = (i == a->lastFile) ? a->endOffset : fileSize(file);
-			
+
 			if (startFile) {
 				startFile = false;
 				pos = a->startOffset + kExecSize;
@@ -604,7 +604,7 @@
 							fseek(file, pos, SEEK_SET);
 						}
 					}
-				
+
 					snprintf(filename, 64, "%s.%03d", _baseFilename, i+1);
 
 					FILE *file2 = fopen(filename, "rb");
@@ -619,13 +619,13 @@
 				}
 
 				uint32 id = READ_LE_UINT32(hdr);
-				
+
 				if (id == 0x04034B50) {
 					if (hdr[8] != 8)
 						error("compression type not implemented");
 					insize = READ_LE_UINT32(hdr + 18);
 					outsize = READ_LE_UINT32(hdr + 22);
-			
+
 					uint16 filestrlen = READ_LE_UINT16(hdr + 26);
 					*(hdr + 30 + filestrlen) = 0;
 					strcpy(entryStr, (const char *)(hdr + 30));
@@ -643,7 +643,7 @@
 					if ((pos + insize) > size) {
 						// this is for files that are split between two archive files
 						inPart1 = size - pos;
-						inPart2 = insize - inPart1;				
+						inPart2 = insize - inPart1;
 						fread(inbuffer, 1, inPart1, file);
 					} else {
 						fread(inbuffer, 1, insize, file);

Modified: tools/trunk/kyra_pak.cpp
===================================================================
--- tools/trunk/kyra_pak.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/kyra_pak.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -225,7 +225,7 @@
 			error("entry '%s' already exists");
 			return false;
 		}
-		
+
 		if (memcmp(fileData, data, size) == 0)
 			return true;
 
@@ -268,8 +268,8 @@
 		_links = entry;
 	else
 		_links->addEntry(entry);
-	
-	return true;	
+
+	return true;
 }
 
 static bool isInList(const char * const *linkList, const char *linkTo, const int maxSize) {
@@ -290,7 +290,7 @@
 	FILE *output = fopen("LINKLIST.TMP", "wb");
 	if (!output)
 		error("Couldn't open file 'LINKLIST.TMP'");
-	
+
 	const char **linkList = new const char *[countLinks];
 	int usedLinks = 0;
 
@@ -298,7 +298,7 @@
 	for (int i = 0; i < countLinks && entry; ++i, entry = entry->next) {
 		if (isInList(linkList, entry->linksTo, usedLinks))
 			continue;
-		
+
 		linkList[usedLinks++] = entry->linksTo;
 	}
 
@@ -306,7 +306,7 @@
 	writeUint32BE(output, usedLinks);
 	for (int i = 0; i < usedLinks; ++i) {
 		int count = 0;
-		entry = _links;		
+		entry = _links;
 		while (entry) {
 			if (scumm_stricmp(entry->linksTo, linkList[i]) == 0)
 				++count;

Modified: tools/trunk/sci/sfx/tests/tests.cpp
===================================================================
--- tools/trunk/sci/sfx/tests/tests.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/sci/sfx/tests/tests.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -9,14 +9,14 @@
 // PCM not present
 0,
 // channel defs
-0, 0x20, 0, 0x21, 0, 0, 0, 0, 
-0, 0,    0, 0,    0, 0, 0, 0, 
-0, 0,    0, 0,    0, 0, 0, 0, 
+0, 0x20, 0, 0x21, 0, 0, 0, 0,
 0, 0,    0, 0,    0, 0, 0, 0,
+0, 0,    0, 0,    0, 0, 0, 0,
+0, 0,    0, 0,    0, 0, 0, 0,
 // note on, wait, note off
 0xAA,
 0x90, 0xAA, 0xAA,
-0xAA, 
+0xAA,
 0x80, 0xAA, 0xAA,
 0xAA,
 0x91, 0xAA, 0xAA,
@@ -76,7 +76,7 @@
 
 	song_iterator_add_death_listener(
 			it,
-			it, 
+			it,
 			(void (*)(void *, void*))DeathListenerCallback);
 
 	for (i=0; i < SONG_CMD_COUNT; i++)
@@ -97,12 +97,12 @@
 
 	song_iterator_add_death_listener(
 			it,
-			it, 
+			it,
 			(void (*)(void *, void*))DeathListenerCallback);
 
 	song_iterator_add_death_listener(
 			it,
-			it, 
+			it,
 			(void (*)(void *, void*))DeathListenerCallback);
 
 	for (i=0; i < SONG_CMD_COUNT; i++)
@@ -121,7 +121,7 @@
 {
 	TEST_SETUP();
 	SIMSG_SEND(it, SIMSG_STOP);
-	
+
 	message = songit_next(&it, &cmds, &result, IT_READER_MASK_ALL);
 	TESTEQUAL(SI_FINISHED, message);
 

Modified: tools/trunk/tools_gui.cpp
===================================================================
--- tools/trunk/tools_gui.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/tools_gui.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -141,7 +141,7 @@
 			_target->SetValue(wxT("\""));
 			_target->AppendText(filenames.Item(0));
 			_target->AppendText(wxT("\""));
-	
+
 			_target->SetInsertionPoint(0);
 		}
 	} else {
@@ -151,7 +151,7 @@
 			_target->SetValue(wxT("\""));
 			_target->AppendText(dialog->GetPath());
 			_target->AppendText(wxT("\""));
-	
+
 			_target->SetInsertionPoint(0);
 		}
 	}
@@ -169,7 +169,7 @@
 		_target->SetValue(wxT("\""));
 		_target->AppendText(filenames[0]);
 		_target->AppendText(wxT("\""));
-	
+
 		_target->SetInsertionPoint(0);
 	}
 

Modified: tools/trunk/tools_gui.h
===================================================================
--- tools/trunk/tools_gui.h	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/tools_gui.h	2009-05-24 15:19:28 UTC (rev 40868)
@@ -63,7 +63,7 @@
 #  define wxFD_MULTIPLE wxMULTIPLE
 #endif
 
-/* Options available in the UI 
+/* Options available in the UI
  * In most cases, the "Names" filled in here will directly be provided in the UI
  * For the fields that have two options, the second option will be the one
  * passed on as a command line option, in other cases the Name will be directly
@@ -195,7 +195,7 @@
 #endif
 
 /* This is just a wxFilePicker with the addition of a constructor
- * argument for picking directiories instead 
+ * argument for picking directiories instead
  */
 class IOChooser : public wxPanel {
 public:
@@ -223,7 +223,7 @@
 /* ----- Compression ----- */
 
 /* The compression options, a panel containing the controls
- * for controlling the output of the tools 
+ * for controlling the output of the tools
  */
 class CompressionOptions : public wxPanel {
 public:

Modified: tools/trunk/util.h
===================================================================
--- tools/trunk/util.h	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/util.h	2009-05-24 15:19:28 UTC (rev 40868)
@@ -49,8 +49,8 @@
 typedef unsigned short uint16;
 typedef signed char int8;
 typedef signed short int16;
-#ifdef __amigaos4__ 
-#include <exec/types.h> 
+#ifdef __amigaos4__
+#include <exec/types.h>
 #include <stdlib.h>
 #else
 typedef unsigned int uint32;

Modified: tools/trunk/utils/adpcm.cpp
===================================================================
--- tools/trunk/utils/adpcm.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/utils/adpcm.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -172,7 +172,7 @@
 	for (samples = 0; samples < numSamples && !_stream->eos() && _stream->pos() < _endpos;) {
 		for (int channel = 0; channel < 2; channel++) {
 			data = _stream->readUint32LE();
-			
+
 			for (nibble = 0; nibble < 8; nibble++) {
 				byte k = ((data & 0xf0000000) >> 28);
 				WRITE_LE_UINT16(buffer + samples + channel + nibble * 2, decodeMSIMA(k));

Modified: tools/trunk/utils/md5.cpp
===================================================================
--- tools/trunk/utils/md5.cpp	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/utils/md5.cpp	2009-05-24 15:19:28 UTC (rev 40868)
@@ -245,7 +245,7 @@
 
 	md5_starts(&ctx);
 
-	
+
 	while ((i = (uint32)fread(buf, 1, readlen, f)) > 0) {
 		md5_update(&ctx, buf, i);
 

Modified: tools/trunk/utils/stream.h
===================================================================
--- tools/trunk/utils/stream.h	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/utils/stream.h	2009-05-24 15:19:28 UTC (rev 40868)
@@ -142,7 +142,7 @@
 	virtual uint32 size() const = 0;
 
 	virtual void seek(int32 offset, int whence = SEEK_SET) = 0;
-	
+
 	void skip(uint32 offset) { seek(offset, SEEK_CUR); }
 };
 

Modified: tools/trunk/utils/util.h
===================================================================
--- tools/trunk/utils/util.h	2009-05-24 15:17:42 UTC (rev 40867)
+++ tools/trunk/utils/util.h	2009-05-24 15:19:28 UTC (rev 40868)
@@ -37,7 +37,7 @@
 template<typename T> inline T ABS (T x)			{ return (x>=0) ? x : -x; }
 template<typename T> inline T MIN (T a, T b)	{ return (a<b) ? a : b; }
 template<typename T> inline T MAX (T a, T b)	{ return (a>b) ? a : b; }
-template<typename T> inline T CLIP (T v, T amin, T amax) 
+template<typename T> inline T CLIP (T v, T amin, T amax)
 		{ if (v < amin) return amin; else if (v > amax) return amax; else return v; }
 
 /**


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