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) --- engines/sci/engine/kfile.cpp | 2 +- engines/sci/engine/message.cpp | 2 +- engines/sci/engine/scriptdebug.cpp | 2 +- engines/sci/engine/seg_manager.cpp | 2 +- engines/sci/engine/segment.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index ce903626e7..aade40fd9f 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -823,7 +823,7 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) { int size = argv[2].toUint16(); char *buf = new char[size]; bool success = false; - s->_segMan->memcpy((byte*)buf, argv[1], size); + s->_segMan->memcpy((byte *)buf, argv[1], size); debugC(kDebugLevelFile, "kFileIO(writeRaw): %d, %d", handle, size); FileHandle *f = getFileFromHandle(s, handle); diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index f30f4e923e..cddd01e10c 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -345,7 +345,7 @@ bool MessageState::stringLit(Common::String &outStr, const Common::String &inStr } bool MessageState::stringStage(Common::String &outstr, const Common::String &inStr, uint &index) { - // Stage directions of the form (n*), where n is anything but a digit or a lowercase character + // Stage directions of the form (n *), where n is anything but a digit or a lowercase character if (inStr[index] != '(') return false; diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 554a6b6a2c..ef61b2e28a 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -727,7 +727,7 @@ void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *ke switch (mobj->getType()) { case SEG_TYPE_HUNK: { - HunkTable *ht = (HunkTable*)mobj; + HunkTable *ht = (HunkTable *)mobj; int index = argv[parmNr].offset; if (ht->isValidEntry(index)) { // NOTE: This ", deleted" isn't as useful as it could diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 04c61f7b7c..cc127c8dbc 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -691,7 +691,7 @@ void SegManager::memcpy(reg_t dest, const byte* src, size_t n) { if (dest_r.isRaw) { // raw -> raw - ::memcpy((char*)dest_r.raw, src, n); + ::memcpy((char *)dest_r.raw, src, n); } else { // raw -> non-raw for (uint i = 0; i < n; i++) diff --git a/engines/sci/engine/segment.cpp b/engines/sci/engine/segment.cpp index fcf9774a08..36b7d92c07 100644 --- a/engines/sci/engine/segment.cpp +++ b/engines/sci/engine/segment.cpp @@ -306,7 +306,7 @@ SegmentRef StringTable::dereference(reg_t pointer) { SegmentRef ret; ret.isRaw = true; ret.maxSize = _table[pointer.offset].getSize(); - ret.raw = (byte*)_table[pointer.offset].getRawData(); + ret.raw = (byte *)_table[pointer.offset].getRawData(); return ret; } -- cgit v1.2.3