aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorTarek Soliman2012-02-15 09:53:31 -0600
committerTarek Soliman2012-02-15 10:07:10 -0600
commita4798602d7a025dc13fd253d584dbf29dbec488d (patch)
treed6e764535eb4eef6d3c313e00a7eaea8b1724a2d /backends/fs
parent921f602ab8631a9d10e0a173b6b331dbafda564a (diff)
downloadscummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.tar.gz
scummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.tar.bz2
scummvm-rg350-a4798602d7a025dc13fd253d584dbf29dbec488d.zip
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)
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/symbian/symbian-fs.cpp2
-rw-r--r--backends/fs/symbian/symbianstream.cpp30
-rw-r--r--backends/fs/windows/windows-fs.cpp2
3 files changed, 17 insertions, 17 deletions
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 1beab3c13a..fc78f7580b 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -153,7 +153,7 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
sprintf(path,"%c:\\", driveNumber+'A');
SymbianFilesystemNode entry(false);
- entry._displayName = (char*) driveString8.PtrZ(); // drive_name
+ entry._displayName = (char *) driveString8.PtrZ(); // drive_name
entry._isDirectory = true;
entry._isValid = true;
entry._isPseudoRoot = false;
diff --git a/backends/fs/symbian/symbianstream.cpp b/backends/fs/symbian/symbianstream.cpp
index f4873292b3..fa7842d3b1 100644
--- a/backends/fs/symbian/symbianstream.cpp
+++ b/backends/fs/symbian/symbianstream.cpp
@@ -96,7 +96,7 @@ TSymbianFileEntry* CreateSymbianFileEntry(const char* name, const char* mode) {
}
size_t ReadData(const void* ptr, size_t size, size_t numItems, TSymbianFileEntry* handle) {
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(handle));
TUint32 totsize = size*numItems;
TPtr8 pointer ( (unsigned char*) ptr, totsize);
@@ -169,29 +169,29 @@ SymbianStdioStream::SymbianStdioStream(void *handle) : _handle(handle) {
}
SymbianStdioStream::~SymbianStdioStream() {
- ((TSymbianFileEntry*)(_handle))->_fileHandle.Close();
+ ((TSymbianFileEntry *)(_handle))->_fileHandle.Close();
- delete (TSymbianFileEntry*)(_handle);
+ delete (TSymbianFileEntry *)(_handle);
}
bool SymbianStdioStream::err() const {
- return ((TSymbianFileEntry*)(_handle))->_lastError != 0;
+ return ((TSymbianFileEntry *)(_handle))->_lastError != 0;
}
void SymbianStdioStream::clearErr() {
- ((TSymbianFileEntry*)(_handle))->_lastError = 0;
- ((TSymbianFileEntry*)(_handle))->_eofReached = 0;
+ ((TSymbianFileEntry *)(_handle))->_lastError = 0;
+ ((TSymbianFileEntry *)(_handle))->_eofReached = 0;
}
bool SymbianStdioStream::eos() const {
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(_handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(_handle));
return entry->_eofReached != 0;
}
int32 SymbianStdioStream::pos() const {
TInt pos = 0;
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(_handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(_handle));
entry->_lastError = entry->_fileHandle.Seek(ESeekCurrent, pos);
if (entry->_lastError == KErrNone && entry->_inputPos != KErrNotFound) {
@@ -204,7 +204,7 @@ int32 SymbianStdioStream::pos() const {
int32 SymbianStdioStream::size() const {
TInt length = 0;
- ((TSymbianFileEntry*)(_handle))->_fileHandle.Size(length);
+ ((TSymbianFileEntry *)(_handle))->_fileHandle.Size(length);
return length;
}
@@ -214,7 +214,7 @@ bool SymbianStdioStream::seek(int32 offs, int whence) {
TSeek seekMode = ESeekStart;
TInt pos = offs;
- TSymbianFileEntry* entry = ((TSymbianFileEntry*)(_handle));
+ TSymbianFileEntry* entry = ((TSymbianFileEntry *)(_handle));
switch (whence) {
case SEEK_SET:
@@ -246,11 +246,11 @@ uint32 SymbianStdioStream::read(void *ptr, uint32 len) {
uint32 SymbianStdioStream::write(const void *ptr, uint32 len) {
TPtrC8 pointer( (unsigned char*) ptr, len);
- ((TSymbianFileEntry*)(_handle))->_inputPos = KErrNotFound;
- ((TSymbianFileEntry*)(_handle))->_lastError = ((TSymbianFileEntry*)(_handle))->_fileHandle.Write(pointer);
- ((TSymbianFileEntry*)(_handle))->_eofReached = EFalse;
+ ((TSymbianFileEntry *)(_handle))->_inputPos = KErrNotFound;
+ ((TSymbianFileEntry *)(_handle))->_lastError = ((TSymbianFileEntry *)(_handle))->_fileHandle.Write(pointer);
+ ((TSymbianFileEntry *)(_handle))->_eofReached = EFalse;
- if (((TSymbianFileEntry*)(_handle))->_lastError == KErrNone) {
+ if (((TSymbianFileEntry *)(_handle))->_lastError == KErrNone) {
return len;
}
@@ -258,7 +258,7 @@ uint32 SymbianStdioStream::write(const void *ptr, uint32 len) {
}
bool SymbianStdioStream::flush() {
- ((TSymbianFileEntry*)(_handle))->_fileHandle.Flush();
+ ((TSymbianFileEntry *)(_handle))->_fileHandle.Flush();
return true;
}
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index c32ad2da94..030f394f81 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -87,7 +87,7 @@ void WindowsFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const c
char* WindowsFilesystemNode::toAscii(TCHAR *str) {
#ifndef UNICODE
- return (char*)str;
+ return (char *)str;
#else
static char asciiString[MAX_PATH];
WideCharToMultiByte(CP_ACP, 0, str, _tcslen(str) + 1, asciiString, sizeof(asciiString), NULL, NULL);