From a4798602d7a025dc13fd253d584dbf29dbec488d Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Wed, 15 Feb 2012 09:53:31 -0600 Subject: JANITORIAL: Fix missing whitespace in pointer cast find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g' This seems to have caught some params as well which is not undesirable IMO. It also caught some strings containing this which is undesirable so I excluded them manually. (engines/sci/engine/kernel_tables.h) --- devtools/create_kyradat/extract.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'devtools/create_kyradat') diff --git a/devtools/create_kyradat/extract.cpp b/devtools/create_kyradat/extract.cpp index b755b8d3ec..34308f1b5b 100644 --- a/devtools/create_kyradat/extract.cpp +++ b/devtools/create_kyradat/extract.cpp @@ -314,7 +314,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da input += 0x11; output += 0x0F; } - strcpy((char*) output, (const char*) input); + strcpy((char *) output, (const char*) input); uint32 stringsize = strlen((const char*)output) + 1; input += stringsize; output += stringsize; // skip empty entries @@ -370,7 +370,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da } else if (patch == 5) { const byte *c = data + size; do { - strcpy((char*) output, (const char*) input); + strcpy((char *) output, (const char*) input); uint32 stringsize = strlen((const char*)output) + 1; input += stringsize; output += stringsize; @@ -403,7 +403,7 @@ bool extractStrings(PAKFile &out, const ExtractInformation *info, const byte *da output += 44; data += 44; for (int t = 1; t != 10; t++) { - sprintf((char*) output, "COST%d_SH.PAK", t); + sprintf((char *) output, "COST%d_SH.PAK", t); output += 13; } data += 126; @@ -576,7 +576,7 @@ bool extractHofSeqData(PAKFile &out, const ExtractInformation *info, const byte byte *buffer = new byte[bufferSize]; assert(buffer); memset(buffer, 0, bufferSize ); - uint16 *header = (uint16*) buffer; + uint16 *header = (uint16 *) buffer; byte *output = buffer + headerSize; uint16 *hdout = header; @@ -751,7 +751,7 @@ bool extractHofSeqData(PAKFile &out, const ExtractInformation *info, const byte byte *finBuffer = new byte[finBufferSize]; assert(finBuffer); uint16 diff = headerSize - finHeaderSize; - uint16 *finHeader = (uint16*) finBuffer; + uint16 *finHeader = (uint16 *) finBuffer; for (int i = 1; i < finHeaderSize; i++) WRITE_BE_UINT16(&finHeader[i], (READ_BE_UINT16(&header[i]) - diff)); @@ -760,7 +760,7 @@ bool extractHofSeqData(PAKFile &out, const ExtractInformation *info, const byte memcpy (finBuffer + finHeaderSize, buffer + headerSize, finBufferSize - finHeaderSize); delete[] buffer; - finHeader = (uint16*) (finBuffer + ((numSequences + 2) * sizeof(uint16))); + finHeader = (uint16 *) (finBuffer + ((numSequences + 2) * sizeof(uint16))); for (int i = 0; i < numNestedSequences; i++) { uint8 * offs = finBuffer + READ_BE_UINT16(finHeader++) + 26; uint16 ctrl = READ_BE_UINT16(offs); -- cgit v1.2.3