summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authoromegadox <omegadox@gmail.com>2009-03-28 08:57:34 +0000
committeromegadox <omegadox@gmail.com>2009-03-28 08:57:34 +0000
commiteb0cab140f4aa4e17cb60e39e7467a36d6bfa97d (patch)
treef725c5354346506a0491211b87e1d59cb62b7fdc /Source/Core/Common
parentbdabcd4bf5a460eaed21571b17ecd48b8f8c01aa (diff)
Some code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2768 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Common.vcproj100
-rw-r--r--Source/Core/Common/Src/ABI.cpp2
-rw-r--r--Source/Core/Common/Src/ABI.h12
-rw-r--r--Source/Core/Common/Src/CDUtils.cpp71
-rw-r--r--Source/Core/Common/Src/CDUtils.h35
-rw-r--r--Source/Core/Common/Src/CPUDetect.cpp2
-rw-r--r--Source/Core/Common/Src/CPUDetect.h8
-rw-r--r--Source/Core/Common/Src/ChunkFile.cpp2
-rw-r--r--Source/Core/Common/Src/ChunkFile.h8
-rw-r--r--Source/Core/Common/Src/ColorUtil.cpp2
-rw-r--r--Source/Core/Common/Src/ColorUtil.h8
-rw-r--r--Source/Core/Common/Src/Common.h18
-rw-r--r--Source/Core/Common/Src/CommonFuncs.h10
-rw-r--r--Source/Core/Common/Src/CommonPaths.h8
-rw-r--r--Source/Core/Common/Src/CommonTypes.h8
-rw-r--r--Source/Core/Common/Src/ConsoleListener.cpp4
-rw-r--r--Source/Core/Common/Src/DynamicLibrary.cpp4
-rw-r--r--Source/Core/Common/Src/DynamicLibrary.h8
-rw-r--r--Source/Core/Common/Src/ExtendedTrace.cpp11
-rw-r--r--Source/Core/Common/Src/ExtendedTrace.h21
-rw-r--r--Source/Core/Common/Src/FileSearch.cpp4
-rw-r--r--Source/Core/Common/Src/FileSearch.h8
-rw-r--r--Source/Core/Common/Src/FileUtil.cpp20
-rw-r--r--Source/Core/Common/Src/FileUtil.h9
-rw-r--r--Source/Core/Common/Src/FixedSizeQueue.h8
-rw-r--r--Source/Core/Common/Src/Hash.cpp4
-rw-r--r--Source/Core/Common/Src/Hash.h8
-rw-r--r--Source/Core/Common/Src/IniFile.cpp32
-rw-r--r--Source/Core/Common/Src/IniFile.h8
-rw-r--r--Source/Core/Common/Src/Log.h6
-rw-r--r--Source/Core/Common/Src/LogManager.cpp17
-rw-r--r--Source/Core/Common/Src/LogManager.h8
-rw-r--r--Source/Core/Common/Src/MappedFile.cpp4
-rw-r--r--Source/Core/Common/Src/MappedFile.h12
-rw-r--r--Source/Core/Common/Src/MathUtil.cpp4
-rw-r--r--Source/Core/Common/Src/MathUtil.h6
-rw-r--r--Source/Core/Common/Src/MemArena.cpp2
-rw-r--r--Source/Core/Common/Src/MemArena.h8
-rw-r--r--Source/Core/Common/Src/Misc.cpp2
-rw-r--r--Source/Core/Common/Src/MsgHandler.cpp6
-rw-r--r--Source/Core/Common/Src/MsgHandler.h8
-rw-r--r--Source/Core/Common/Src/Plugin.cpp8
-rw-r--r--Source/Core/Common/Src/Plugin.h8
-rw-r--r--Source/Core/Common/Src/PluginDSP.cpp17
-rw-r--r--Source/Core/Common/Src/PluginDSP.h23
-rw-r--r--Source/Core/Common/Src/PluginPAD.cpp19
-rw-r--r--Source/Core/Common/Src/PluginPAD.h23
-rw-r--r--Source/Core/Common/Src/PluginVideo.cpp17
-rw-r--r--Source/Core/Common/Src/PluginVideo.h23
-rw-r--r--Source/Core/Common/Src/PluginWiimote.cpp22
-rw-r--r--Source/Core/Common/Src/PluginWiimote.h23
-rw-r--r--Source/Core/Common/Src/Setup.h32
-rw-r--r--Source/Core/Common/Src/StringUtil.cpp16
-rw-r--r--Source/Core/Common/Src/StringUtil.h8
-rw-r--r--Source/Core/Common/Src/Thread.cpp24
-rw-r--r--Source/Core/Common/Src/Thread.h19
-rw-r--r--Source/Core/Common/Src/Thunk.cpp2
-rw-r--r--Source/Core/Common/Src/Thunk.h8
-rw-r--r--Source/Core/Common/Src/Timer.cpp19
-rw-r--r--Source/Core/Common/Src/Timer.h12
-rw-r--r--Source/Core/Common/Src/stdafx.cpp18
-rw-r--r--Source/Core/Common/Src/stdafx.h35
-rw-r--r--Source/Core/Common/Src/x64Analyzer.cpp6
-rw-r--r--Source/Core/Common/Src/x64Analyzer.h9
-rw-r--r--Source/Core/Common/Src/x64Emitter.cpp2
-rw-r--r--Source/Core/Common/Src/x64Emitter.h8
66 files changed, 425 insertions, 502 deletions
diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj
index c86cb67f28..4cb9181449 100644
--- a/Source/Core/Common/Common.vcproj
+++ b/Source/Core/Common/Common.vcproj
@@ -51,12 +51,12 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -124,12 +124,12 @@
RuntimeLibrary="1"
BufferSecurityCheck="false"
FloatingPointModel="0"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -191,18 +191,18 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="2"
AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="0"
RuntimeTypeInfo="false"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -265,18 +265,18 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="0"
FloatingPointModel="0"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -337,16 +337,16 @@
Optimization="3"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -408,15 +408,15 @@
Optimization="3"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="../../PluginSpecs"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
RuntimeLibrary="0"
FloatingPointModel="0"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="stdafx.h"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough=""
AssemblerListingLocation="$(IntDir)\"
WarningLevel="3"
DebugInformationFormat="3"
- ForcedIncludeFiles="stdafx.h"
+ ForcedIncludeFiles=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -721,62 +721,6 @@
>
</File>
<File
- RelativePath=".\Src\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DebugFast|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="DebugFast|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Src\stdafx.h"
- >
- </File>
- <File
RelativePath=".\Src\StringUtil.cpp"
>
</File>
diff --git a/Source/Core/Common/Src/ABI.cpp b/Source/Core/Common/Src/ABI.cpp
index 787d1c7331..f316b3ff57 100644
--- a/Source/Core/Common/Src/ABI.cpp
+++ b/Source/Core/Common/Src/ABI.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/ABI.h b/Source/Core/Common/Src/ABI.h
index 533ecf0d6f..ed8c01d071 100644
--- a/Source/Core/Common/Src/ABI.h
+++ b/Source/Core/Common/Src/ABI.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _JIT_ABI_H
-#define _JIT_ABI_H
+#ifndef _JIT_ABI_H_
+#define _JIT_ABI_H_
#include "Common.h"
@@ -74,10 +74,10 @@
#define ABI_PARAM5 R8
#define ABI_PARAM6 R9
-#endif
+#endif // WIN32
-#endif
+#endif // X86
-#endif // _JIT_ABI_H
+#endif // _JIT_ABI_H_
diff --git a/Source/Core/Common/Src/CDUtils.cpp b/Source/Core/Common/Src/CDUtils.cpp
index e9672577cb..26dc7640d9 100644
--- a/Source/Core/Common/Src/CDUtils.cpp
+++ b/Source/Core/Common/Src/CDUtils.cpp
@@ -1,12 +1,9 @@
-/* Most of the code in this file was shamelessly ripped from libcdio
- With minor adjustments */
+// Most of the code in this file was shamelessly ripped from libcdio With minor adjustments
#include "CDUtils.h"
+#include "Common.h"
-/*!
- Follow symlinks until we have the real device file
- (idea taken from libunieject).
-*/
+// Follow symlinks until we have the real device file (idea taken from libunieject).
void cdio_follow_symlink(const char * src, char * dst) {
#ifndef _WIN32
char tmp_src[PATH_MAX+1];
@@ -32,10 +29,9 @@ void cdio_follow_symlink(const char * src, char * dst) {
}
-/*!
- Add/allocate a drive to the end of drives.
- Use cdio_free_device_list() to free this device_list.
-*/
+
+// Add/allocate a drive to the end of drives.
+// Use cdio_free_device_list() to free this device_list.
void cdio_add_device_list(char **device_list[], const char *drive,
unsigned int *num_drives) {
if (NULL != drive) {
@@ -53,7 +49,7 @@ void cdio_add_device_list(char **device_list[], const char *drive,
/* Drive not in list. Add it. */
(*num_drives)++;
*device_list = (char **)realloc(*device_list, (*num_drives) * sizeof(char *));
- (*device_list)[*num_drives-1] = strdup(drive);
+ (*device_list)[*num_drives-1] = __strdup(drive);
}
} else {
@@ -67,10 +63,8 @@ void cdio_add_device_list(char **device_list[], const char *drive,
}
}
-/*!
- Free device list returned by cdio_get_devices or
- cdio_get_devices_with_cap.
-*/
+// Free device list returned by cdio_get_devices or
+// cdio_get_devices_with_cap.
void cdio_free_device_list(char * ppsz_device_list[]) {
char **ppsz_device_list_save=ppsz_device_list;
if (!ppsz_device_list) return;
@@ -83,10 +77,8 @@ void cdio_free_device_list(char * ppsz_device_list[]) {
#ifdef _WIN32
-/*
- Returns a string that can be used in a CreateFile call if
- c_drive letter is a character. If not NULL is returned.
-*/
+// Returns a string that can be used in a CreateFile call if
+// c_drive letter is a character. If not NULL is returned.
const char *is_cdrom_win32(const char c_drive_letter) {
UINT uDriveType;
@@ -103,7 +95,7 @@ const char *is_cdrom_win32(const char c_drive_letter) {
case DRIVE_CDROM: {
char sz_win32_drive_full[] = "\\\\.\\X:";
sz_win32_drive_full[4] = c_drive_letter;
- return strdup(&sz_win32_drive_full[4]);
+ return __strdup(&sz_win32_drive_full[4]);
}
default:
//cdio_debug("Drive %c is not a CD-ROM", c_drive_letter);
@@ -111,17 +103,14 @@ const char *is_cdrom_win32(const char c_drive_letter) {
}
}
-/*
- Returns a pointer to an array of strings with the device names
-*/
+// Returns a pointer to an array of strings with the device names
char ** cdio_get_devices_win32() {
char **drives = NULL;
unsigned int num_drives=0;
char drive_letter;
- /* Scan the system for CD-ROM drives.
- Not always 100% reliable, so use the USE_MNTENT code above first.
- */
+ // Scan the system for CD-ROM drives.
+ // Not always 100% reliable, so use the USE_MNTENT code above first.
for (drive_letter='A'; drive_letter <= 'Z'; drive_letter++) {
const char *drive_str=is_cdrom_win32(drive_letter);
if (drive_str != NULL) {
@@ -305,7 +294,7 @@ static char *check_mounts_linux(const char *mtab)
tmp = strstr(mntent->mnt_opts, "fs=");
if ( tmp ) {
free(mnt_type);
- mnt_type = strdup(tmp + strlen("fs="));
+ mnt_type = __strdup(tmp + strlen("fs="));
if ( mnt_type ) {
tmp = strchr(mnt_type, ',');
if ( tmp ) {
@@ -316,7 +305,7 @@ static char *check_mounts_linux(const char *mtab)
tmp = strstr(mntent->mnt_opts, "dev=");
if ( tmp ) {
free(mnt_dev);
- mnt_dev = strdup(tmp + strlen("dev="));
+ mnt_dev = __strdup(tmp + strlen("dev="));
if ( mnt_dev ) {
tmp = strchr(mnt_dev, ',');
if ( tmp ) {
@@ -340,9 +329,7 @@ static char *check_mounts_linux(const char *mtab)
return NULL;
}
-/*
- Returns a pointer to an array of strings with the device names
-*/
+// Returns a pointer to an array of strings with the device names
char **cdio_get_devices_linux () {
unsigned int i;
@@ -351,8 +338,7 @@ char **cdio_get_devices_linux () {
char **drives = NULL;
unsigned int num_drives=0;
- /* Scan the system for CD-ROM drives.
- */
+ // Scan the system for CD-ROM drives.
for ( i=0; strlen(checklist1[i]) > 0; ++i ) {
sprintf(drive, "/dev/%s", checklist1[i]);
if ( is_cdrom_linux(drive, NULL) > 0 ) {
@@ -372,9 +358,8 @@ char **cdio_get_devices_linux () {
free(ret_drive);
}
- /* Scan the system for CD-ROM drives.
- Not always 100% reliable, so use the USE_MNTENT code above first.
- */
+ // Scan the system for CD-ROM drives.
+ // Not always 100% reliable, so use the USE_MNTENT code above first.
for ( i=0; checklist2[i].format; ++i ) {
unsigned int j;
for ( j=checklist2[i].num_min; j<=checklist2[i].num_max; ++j ) {
@@ -389,9 +374,7 @@ char **cdio_get_devices_linux () {
}
#endif
-/*
- Returns a pointer to an array of strings with the device names
-*/
+// Returns a pointer to an array of strings with the device names
char **cdio_get_devices() {
#ifdef _WIN32
return cdio_get_devices_win32();
@@ -405,9 +388,9 @@ char **cdio_get_devices() {
}
// Need to be tested, does calling this function twice cause any damage?
-/*
- Returns true if device is cdrom/dvd
-*/
+
+// Returns true if device is cdrom/dvd
+
bool cdio_is_cdrom(const char *device) {
char **devices = cdio_get_devices();
bool res = false;
@@ -421,7 +404,9 @@ bool cdio_is_cdrom(const char *device) {
cdio_free_device_list(devices);
return res;
}
-
+
+
+// Can we remove this?
/*
int main() {
char** res = cdio_get_devices();
diff --git a/Source/Core/Common/Src/CDUtils.h b/Source/Core/Common/Src/CDUtils.h
index 5fe9c40dd8..9a84d9707e 100644
--- a/Source/Core/Common/Src/CDUtils.h
+++ b/Source/Core/Common/Src/CDUtils.h
@@ -1,15 +1,16 @@
-#ifndef CDUTILS_H
-#define CDUTILS_H
+#ifndef _CDUTILS_H_
+#define _CDUTILS_H_
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
#ifdef _WIN32
-#include "windows.h"
+#include <windows.h>
#define PATH_MAX MAX_PATH
#elif __APPLE__
#include <paths.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
#include <Carbon/Carbon.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/storage/IOCDMedia.h>
@@ -17,16 +18,10 @@
#include <IOKit/IOBSD.h>
#elif __linux__
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <mntent.h>
-
#include <unistd.h>
-
#include <fcntl.h>
#include <limits.h>
-
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -34,20 +29,14 @@
#include <linux/cdrom.h>
#endif // WIN32
-/*
- Returns a pointer to an array of strings with the device names
-*/
+// Returns a pointer to an array of strings with the device names
char **cdio_get_devices();
-/*!
- Free device list returned by cdio_get_devices or
- cdio_get_devices_with_cap.
-*/
+// Free device list returned by cdio_get_devices or
+// cdio_get_devices_with_cap.
void cdio_free_device_list(char * ppsz_device_list[]);
-/*
- Returns true if device is cdrom/dvd
-*/
+// Returns true if device is cdrom/dvd
bool cdio_is_cdrom(const char *device);
-#endif // CDUTILS_H
+#endif // _CDUTILS_H_
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp
index 40dbd5e372..26b06f8f08 100644
--- a/Source/Core/Common/Src/CPUDetect.cpp
+++ b/Source/Core/Common/Src/CPUDetect.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/CPUDetect.h b/Source/Core/Common/Src/CPUDetect.h
index d62145a6c6..25f0e4e308 100644
--- a/Source/Core/Common/Src/CPUDetect.h
+++ b/Source/Core/Common/Src/CPUDetect.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
// http://code.google.com/p/dolphin-emu/
// Detect the cpu, so we'll know which optimizations to use
-#ifndef _CPUDETECT_H
-#define _CPUDETECT_H
+#ifndef _CPUDETECT_H_
+#define _CPUDETECT_H_
#include <string>
@@ -62,4 +62,4 @@ struct CPUInfo
extern CPUInfo cpu_info;
-#endif
+#endif // _CPUDETECT_H_
diff --git a/Source/Core/Common/Src/ChunkFile.cpp b/Source/Core/Common/Src/ChunkFile.cpp
index 3c4614ddfc..c210ec3712 100644
--- a/Source/Core/Common/Src/ChunkFile.cpp
+++ b/Source/Core/Common/Src/ChunkFile.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/ChunkFile.h b/Source/Core/Common/Src/ChunkFile.h
index b9145f04c1..bb14801293 100644
--- a/Source/Core/Common/Src/ChunkFile.h
+++ b/Source/Core/Common/Src/ChunkFile.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _POINTERWRAP_H
-#define _POINTERWRAP_H
+#ifndef _POINTERWRAP_H_
+#define _POINTERWRAP_H_
// Extremely simple serialization framework.
@@ -271,4 +271,4 @@ private:
};
};
-#endif // _POINTERWRAP_H
+#endif // _POINTERWRAP_H_
diff --git a/Source/Core/Common/Src/ColorUtil.cpp b/Source/Core/Common/Src/ColorUtil.cpp
index 970fe1c535..912ce2fb98 100644
--- a/Source/Core/Common/Src/ColorUtil.cpp
+++ b/Source/Core/Common/Src/ColorUtil.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/ColorUtil.h b/Source/Core/Common/Src/ColorUtil.h
index c89676f575..6f906ddea2 100644
--- a/Source/Core/Common/Src/ColorUtil.h
+++ b/Source/Core/Common/Src/ColorUtil.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _COLORUTIL_H
-#define _COLORUTIL_H
+#ifndef _COLORUTIL_H_
+#define _COLORUTIL_H_
namespace ColorUtil
{
@@ -25,4 +25,4 @@ u32 Decode5A3(u16 val);
} // namespace
-#endif
+#endif // _COLORUTIL_H_
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 60f6703689..4ef9e466c6 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _COMMON_H
-#define _COMMON_H
+#ifndef _COMMON_H_
+#define _COMMON_H_
#include <stdlib.h>
#include <stdio.h>
@@ -40,6 +40,15 @@
#include "CommonPaths.h"
#include "CommonFuncs.h"
+#ifdef _MSC_VER
+#define __strdup _strdup
+#define __getcwd _getcwd
+#define __chdir _chdir
+#else
+#define __strdup strdup
+#define __getcwd getcwd
+#define __chdir chdir
+#endif
// Darwin ABI requires that stack frames be aligned to 16-byte boundaries.
// This probably wouldn't break anyone either, but hey
@@ -50,7 +59,6 @@
#endif
#ifdef _WIN32
-
// Check MSC ver
#if !defined _MSC_VER || _MSC_VER <= 1000
#error needs at least version 1000 of MSC
@@ -124,4 +132,4 @@ namespace
TypeName(const TypeName&); \
void operator=(const TypeName&)
-#endif // COMMON_H
+#endif // _COMMON_H_
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h
index 1d4bf5ee28..86933fdfa0 100644
--- a/Source/Core/Common/Src/CommonFuncs.h
+++ b/Source/Core/Common/Src/CommonFuncs.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef COMMONFUNCS_H
-#define COMMONFUNCS_H
+#ifndef _COMMONFUNCS_H_
+#define _COMMONFUNCS_H_
#ifdef _WIN32
#define SLEEP(x) Sleep(x)
@@ -111,6 +111,6 @@ inline u16 swap16(const u8* _pData) {return swap16(*(const u16*)_pData);}
inline u32 swap32(const u8* _pData) {return swap32(*(const u32*)_pData);}
inline u64 swap64(const u8* _pData) {return swap64(*(const u64*)_pData);}
-} // namespace Common
+} // Namespace Common
-#endif // COMMONFUNCS
+#endif // _COMMONFUNCS_H_
diff --git a/Source/Core/Common/Src/CommonPaths.h b/Source/Core/Common/Src/CommonPaths.h
index 8d342e15e7..be5c41db6f 100644
--- a/Source/Core/Common/Src/CommonPaths.h
+++ b/Source/Core/Common/Src/CommonPaths.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef COMMON_PATHS_H
-#define COMMON_PATHS_H
+#ifndef _COMMON_PATHS_H_
+#define _COMMON_PATHS_H_
// Library suffix/prefix
#ifdef _WIN32
@@ -165,4 +165,4 @@
#define FULL_WII_MENU_DIR FULL_WII_USER_DIR "title" DIR_SEP "00000001" DIR_SEP "00000002" DIR_SEP "content"
-#endif // COMMON_PATHS_H
+#endif // _COMMON_PATHS_H_
diff --git a/Source/Core/Common/Src/CommonTypes.h b/Source/Core/Common/Src/CommonTypes.h
index 769640c832..2dee2425d1 100644
--- a/Source/Core/Common/Src/CommonTypes.h
+++ b/Source/Core/Common/Src/CommonTypes.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -20,8 +20,8 @@
// core and the plugin specs. Any definitions that are only used by the core
// should be placed in "Common.h" instead.
-#ifndef _COMMONTYPES_H
-#define _COMMONTYPES_H
+#ifndef _COMMONTYPES_H_
+#define _COMMONTYPES_H_
#ifdef _WIN32
@@ -55,4 +55,4 @@ typedef long long s64;
#endif // _WIN32
-#endif // _COMMONTYPES_H
+#endif // _COMMONTYPES_H_
diff --git a/Source/Core/Common/Src/ConsoleListener.cpp b/Source/Core/Common/Src/ConsoleListener.cpp
index ee44d92ee1..b42556e395 100644
--- a/Source/Core/Common/Src/ConsoleListener.cpp
+++ b/Source/Core/Common/Src/ConsoleListener.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ ConsoleListener::~ConsoleListener()
Close();
}
-//100, 100, "Dolphin Log Console"
+// 100, 100, "Dolphin Log Console"
// Open console window - width and height is the size of console window
// Name is the window title
void ConsoleListener::Open(int width, int height, char *title)
diff --git a/Source/Core/Common/Src/DynamicLibrary.cpp b/Source/Core/Common/Src/DynamicLibrary.cpp
index ae0cf9b958..6bb1b9cadf 100644
--- a/Source/Core/Common/Src/DynamicLibrary.cpp
+++ b/Source/Core/Common/Src/DynamicLibrary.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -163,5 +163,3 @@ void* DynamicLibrary::Get(const char* funcname) const
funcname);
return retval;
}
-
-
diff --git a/Source/Core/Common/Src/DynamicLibrary.h b/Source/Core/Common/Src/DynamicLibrary.h
index 2f3f6301be..c193520edc 100644
--- a/Source/Core/Common/Src/DynamicLibrary.h
+++ b/Source/Core/Common/Src/DynamicLibrary.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _DYNAMICLIBRARY_H
-#define _DYNAMICLIBRARY_H
+#ifndef _DYNAMICLIBRARY_H_
+#define _DYNAMICLIBRARY_H_
#ifdef _WIN32
#include <windows.h>
@@ -56,4 +56,4 @@ private:
#endif
};
-#endif // DYNAMICLIBRARY
+#endif // _DYNAMICLIBRARY_H_
diff --git a/Source/Core/Common/Src/ExtendedTrace.cpp b/Source/Core/Common/Src/ExtendedTrace.cpp
index ac774a5b42..121b516cdd 100644
--- a/Source/Core/Common/Src/ExtendedTrace.cpp
+++ b/Source/Core/Common/Src/ExtendedTrace.cpp
@@ -1,4 +1,4 @@
-//////////////////////////////////////////////////////////////////////////////////////
+// --------------------------------------------------------------------------------------
//
// Written by Zoltan Csizmadia, zoltan_csizmadia@yahoo.com
// For companies(Austin,TX): If you would like to get my resume, send an email.
@@ -10,14 +10,7 @@
// 1.1 WhineCube version Masken
// 1.2 Dolphin version Masken
//
-//////////////////////////////////////////////////////////////////////////////////////
-//
-// ExtendedTrace.cpp
-//
-
-// Include StdAfx.h, if you're using precompiled
-// header through StdAfx.h
-//#include "stdafx.h"
+// --------------------------------------------------------------------------------------
#if defined(WIN32)
diff --git a/Source/Core/Common/Src/ExtendedTrace.h b/Source/Core/Common/Src/ExtendedTrace.h
index 29459cf547..1e08dba9a4 100644
--- a/Source/Core/Common/Src/ExtendedTrace.h
+++ b/Source/Core/Common/Src/ExtendedTrace.h
@@ -1,4 +1,4 @@
-//////////////////////////////////////////////////////////////////////////////////////
+// -----------------------------------------------------------------------------------------
//
// Written by Zoltan Csizmadia, zoltan_csizmadia@yahoo.com
// For companies(Austin,TX): If you would like to get my resume, send an email.
@@ -10,13 +10,10 @@
// 1.1 WhineCube version Masken
// 1.2 Dolphin version Masken
//
-//////////////////////////////////////////////////////////////////////////////////////
-//
-// ExtendedTrace.h
-//
+// ----------------------------------------------------------------------------------------
-#ifndef EXTENDEDTRACE_H_INCLUDED
-#define EXTENDEDTRACE_H_INCLUDED
+#ifndef _EXTENDEDTRACE_H_INCLUDED_
+#define _EXTENDEDTRACE_H_INCLUDED_
#if defined(WIN32)
@@ -31,26 +28,26 @@
#define EXTENDEDTRACEUNINITIALIZE() UninitSymInfo()
#define STACKTRACE(file) StackTrace( GetCurrentThread(), _T(""), file)
#define STACKTRACE2(file, eip, esp, ebp) StackTrace(GetCurrentThread(), _T(""), file, eip, esp, ebp)
-//class File;
+// class File;
BOOL InitSymInfo( PCSTR );
BOOL UninitSymInfo();
void StackTrace( HANDLE, LPCTSTR, FILE *file);
void StackTrace( HANDLE, LPCTSTR, FILE *file, DWORD eip, DWORD esp, DWORD ebp);
-//functions by Masken
+// functions by Masken
void etfprintf(FILE *file, const char *format, ...);
void etfprint(FILE *file, const std::string &text);
#define UEFBUFSIZE 2048
extern char g_uefbuf[UEFBUFSIZE];
-#else //not WIN32
+#else // not WIN32
#define EXTENDEDTRACEINITIALIZE( IniSymbolPath ) ((void)0)
#define EXTENDEDTRACEUNINITIALIZE() ((void)0)
#define STACKTRACE(file) ((void)0)
#define STACKTRACE2(file, eip, esp, ebp) ((void)0)
-#endif //WIN32
+#endif // WIN32
-#endif //EXTENDEDTRACE_H_INCLUDED
+#endif // _EXTENDEDTRACE_H_INCLUDED_
diff --git a/Source/Core/Common/Src/FileSearch.cpp b/Source/Core/Common/Src/FileSearch.cpp
index 02f9cd7f58..ed9db3667c 100644
--- a/Source/Core/Common/Src/FileSearch.cpp
+++ b/Source/Core/Common/Src/FileSearch.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -115,5 +115,3 @@ const CFileSearch::XStringVector& CFileSearch::GetFileNames() const
{
return(m_FileNames);
}
-
-
diff --git a/Source/Core/Common/Src/FileSearch.h b/Source/Core/Common/Src/FileSearch.h
index fec300bfbe..c09c28fadc 100644
--- a/Source/Core/Common/Src/FileSearch.h
+++ b/Source/Core/Common/Src/FileSearch.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef __FILESEARCH_H_
-#define __FILESEARCH_H_
+#ifndef _FILESEARCH_H_
+#define _FILESEARCH_H_
#include <string>
#include <vector>
@@ -40,5 +40,5 @@ class CFileSearch
XStringVector m_FileNames;
};
-#endif
+#endif // _FILESEARCH_H_
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index b4ab4b4b00..fada9db8e8 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -45,11 +45,10 @@
#ifndef S_ISDIR
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
#endif
-/*
- This namespace has various generic functions related to files and paths.
- The code still needs a ton of cleanup.
- REMEMBER: strdup considered harmful!
-*/
+
+// This namespace has various generic functions related to files and paths.
+// The code still needs a ton of cleanup.
+// REMEMBER: strdup considered harmful!
namespace File
{
@@ -70,7 +69,7 @@ bool Exists(const char *filename)
{
struct stat file_info;
- char *copy = StripTailDirSlashes(strdup(filename));
+ char *copy = StripTailDirSlashes(__strdup(filename));
int result = stat(copy, &file_info);
free(copy);
@@ -82,7 +81,7 @@ bool IsDirectory(const char *filename)
{
struct stat file_info;
- char *copy = StripTailDirSlashes(strdup(filename));
+ char *copy = StripTailDirSlashes(__strdup(filename));
int result = stat(copy, &file_info);
free(copy);
@@ -488,7 +487,7 @@ const char *GetCurrentDirectory()
{
const char *dir;
// Get the current working directory (getcwd uses malloc)
- if (!(dir = getcwd(NULL, 0))) {
+ if (!(dir = __getcwd(NULL, 0))) {
ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s",
GetLastErrorMsg());
@@ -500,7 +499,7 @@ const char *GetCurrentDirectory()
// Sets the current directory to the given directory
bool SetCurrentDirectory(const char *_rDirectory)
{
- return chdir(_rDirectory) == 0;
+ return __chdir(_rDirectory) == 0;
}
#if defined(__APPLE__)
@@ -603,4 +602,3 @@ const char *GetUserDirectory()
}
} // namespace
-
diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h
index 542bdc6411..bde5e515e9 100644
--- a/Source/Core/Common/Src/FileUtil.h
+++ b/Source/Core/Common/Src/FileUtil.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _FILEUTIL_H
-#define _FILEUTIL_H
+#ifndef _FILEUTIL_H_
+#define _FILEUTIL_H_
#include <string>
#include <vector>
@@ -24,9 +24,6 @@
#include "Common.h"
-/*
- This namespace has various generic functions related to files and paths.
-*/
namespace File
{
diff --git a/Source/Core/Common/Src/FixedSizeQueue.h b/Source/Core/Common/Src/FixedSizeQueue.h
index b2252a09cf..37b9523670 100644
--- a/Source/Core/Common/Src/FixedSizeQueue.h
+++ b/Source/Core/Common/Src/FixedSizeQueue.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _FIXED_SIZE_QUEUE_H
-#define _FIXED_SIZE_QUEUE_H
+#ifndef _FIXED_SIZE_QUEUE_H_
+#define _FIXED_SIZE_QUEUE_H_
// STL-look-a-like interface, but name is mixed case to distinguish it clearly from the
// real STL classes.
@@ -83,5 +83,5 @@ public:
}
};
-#endif // _FIXED_SIZE_QUEUE_H
+#endif // _FIXED_SIZE_QUEUE_H_
diff --git a/Source/Core/Common/Src/Hash.cpp b/Source/Core/Common/Src/Hash.cpp
index 3d28c57832..149cfbe929 100644
--- a/Source/Core/Common/Src/Hash.cpp
+++ b/Source/Core/Common/Src/Hash.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ u32 HashFletcher(const u8* data_u8, size_t length)
sum2 = (sum2 & 0xffff) + (sum2 >> 16);
}
- /* Second reduction step to reduce sums to 16 bits */
+ // Second reduction step to reduce sums to 16 bits
sum1 = (sum1 & 0xffff) + (sum1 >> 16);
sum2 = (sum2 & 0xffff) + (sum2 >> 16);
return(sum2 << 16 | sum1);
diff --git a/Source/Core/Common/Src/Hash.h b/Source/Core/Common/Src/Hash.h
index cf9020c9ca..be406c5006 100644
--- a/Source/Core/Common/Src/Hash.h
+++ b/Source/Core/Common/Src/Hash.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _HASH_H
-#define _HASH_H
+#ifndef _HASH_H_
+#define _HASH_H_
#include "Common.h"
@@ -25,4 +25,4 @@ u32 HashAdler32(const u8* data, size_t len); // Fairly accurate, slightl
u32 HashFNV(const u8* ptr, int length); // Another fast and decent hash
u32 HashEctor(const u8* ptr, int length); // JUNK. DO NOT USE FOR NEW THINGS
-#endif
+#endif // _HASH_H_
diff --git a/Source/Core/Common/Src/IniFile.cpp b/Source/Core/Common/Src/IniFile.cpp
index 772a822919..d2c8b2f94e 100644
--- a/Source/Core/Common/Src/IniFile.cpp
+++ b/Source/Core/Common/Src/IniFile.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,9 +16,6 @@
// http://code.google.com/p/dolphin-emu/
// see IniFile.h
-//////////////////////////////////////////////////////////////////////////////////////
-// Include
-// ------------
#include <stdlib.h>
#include <stdio.h>
@@ -30,24 +27,13 @@
#include "StringUtil.h"
#include "IniFile.h"
-///////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Class
-// ------------
IniFile::IniFile()
{}
-
IniFile::~IniFile()
{}
-///////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Section functions used locally only
-// ------------
Section::Section()
: lines(), name(""), comment("") {}
@@ -91,7 +77,6 @@ Section* IniFile::GetOrCreateSection(const char* sectionName)
return(section);
}
-///////////////////////////////
bool IniFile::DeleteSection(const char* sectionName)
@@ -115,7 +100,6 @@ bool IniFile::DeleteSection(const char* sectionName)
return false;
}
-
void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut, std::string* commentOut) const
{
// allow many types of commenting
@@ -153,7 +137,6 @@ void IniFile::ParseLine(const std::string& line, std::string* keyOut, std::strin
}
}
-
std::string* IniFile::GetLine(Section* section, const char* key, std::string* valueOut, std::string* commentOut)
{
for (std::vector<std::string>::iterator iter = section->lines.begin(); iter != section->lines.end(); ++iter)
@@ -283,10 +266,6 @@ void IniFile::SortSections()
std::sort(sections.begin(), sections.end());
}
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Load and save file
-// ------------
bool IniFile::Load(const char* filename)
{
// Maximum number of letters in a line
@@ -382,12 +361,7 @@ bool IniFile::Save(const char* filename)
out.close();
return true;
}
-//////////////////////////////////////////
-
-//////////////////////////////////////////////////////////////////////////////////////
-// Get and set elements
-// ------------
void IniFile::Set(const char* sectionName, const char* key, const char* newValue)
{
Section* section = GetOrCreateSection(sectionName);
@@ -544,10 +518,9 @@ bool IniFile::Get(const char* sectionName, const char* key, bool* value, bool de
*value = defaultValue;
return false;
}
-////////////////////////////////////////
-
+// TODO: Keep this code below?
/*
int main()
{
@@ -567,4 +540,3 @@ bool IniFile::Get(const char* sectionName, const char* key, bool* value, bool de
return 0;
}
*/
-
diff --git a/Source/Core/Common/Src/IniFile.h b/Source/Core/Common/Src/IniFile.h
index d55ff54054..367d018a72 100644
--- a/Source/Core/Common/Src/IniFile.h
+++ b/Source/Core/Common/Src/IniFile.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _INIFILE_H
-#define _INIFILE_H
+#ifndef _INIFILE_H_
+#define _INIFILE_H_
#include <string>
#include <vector>
@@ -88,4 +88,4 @@ private:
void CreateSection(const char* section);
};
-#endif
+#endif // _INIFILE_H_
diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h
index 94d03a4361..8e48f231bc 100644
--- a/Source/Core/Common/Src/Log.h
+++ b/Source/Core/Common/Src/Log.h
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _LOG_H
-#define _LOG_H
+#ifndef _LOG_H_
+#define _LOG_H_
#define NOTICE_LEVEL 1 // VERY important information that is NOT errors. Like startup and OSReports.
#define ERROR_LEVEL 2 // Critical errors
@@ -165,4 +165,4 @@ enum LOG_LEVELS {
}
#endif // WIN32
-#endif // LOG_H
+#endif // _LOG_H_
diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp
index 5cc9c63cfb..f1f9834387 100644
--- a/Source/Core/Common/Src/LogManager.cpp
+++ b/Source/Core/Common/Src/LogManager.cpp
@@ -1,3 +1,20 @@
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
#include "LogManager.h"
#include "Timer.h"
diff --git a/Source/Core/Common/Src/LogManager.h b/Source/Core/Common/Src/LogManager.h
index 6328602256..c51a846911 100644
--- a/Source/Core/Common/Src/LogManager.h
+++ b/Source/Core/Common/Src/LogManager.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _LOGMANAGER_H
-#define _LOGMANAGER_H
+#ifndef _LOGMANAGER_H_
+#define _LOGMANAGER_H_
#include "Log.h"
#include "Thread.h"
@@ -187,4 +187,4 @@ public:
~LogManager();
};
-#endif // LOGMANAGER_H
+#endif // _LOGMANAGER_H_
diff --git a/Source/Core/Common/Src/MappedFile.cpp b/Source/Core/Common/Src/MappedFile.cpp
index fb211a34b2..6c3e9832b9 100644
--- a/Source/Core/Common/Src/MappedFile.cpp
+++ b/Source/Core/Common/Src/MappedFile.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -230,4 +230,4 @@ IMappedFile* IMappedFile::CreateMappedFileDEPRECATED(void)
{
return(new CMappedFile);
}
-} // end of namespace Common
+} // namespace Common
diff --git a/Source/Core/Common/Src/MappedFile.h b/Source/Core/Common/Src/MappedFile.h
index 45627cc7d2..fe4ceeeaa5 100644
--- a/Source/Core/Common/Src/MappedFile.h
+++ b/Source/Core/Common/Src/MappedFile.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -14,14 +14,16 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
+
+// ------------------------------------------------------
// Handles giant memory mapped files
// Through some trickery, allows lock on byte boundaries
// instead of allocation granularity boundaries
// for ease of use
-//
+// ------------------------------------------------------
-#ifndef _MAPPED_FILE_H
-#define _MAPPED_FILE_H
+#ifndef _MAPPED_FILE_H_
+#define _MAPPED_FILE_H_
#include <map>
@@ -44,4 +46,4 @@ public:
} // namespace
-#endif
+#endif // _MAPPED_FILE_H_
diff --git a/Source/Core/Common/Src/MathUtil.cpp b/Source/Core/Common/Src/MathUtil.cpp
index 4c2e6a0fc1..65446cec0c 100644
--- a/Source/Core/Common/Src/MathUtil.cpp
+++ b/Source/Core/Common/Src/MathUtil.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -40,5 +40,3 @@ void SaveSSEState()
{
saved_sse_state = _mm_getcsr();
}
-
-
diff --git a/Source/Core/Common/Src/MathUtil.h b/Source/Core/Common/Src/MathUtil.h
index 6e55b4a789..cbf24bcd35 100644
--- a/Source/Core/Common/Src/MathUtil.h
+++ b/Source/Core/Common/Src/MathUtil.h
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _MATH_UTIL_H
-#define _MATH_UTIL_H
+#ifndef _MATH_UTIL_H_
+#define _MATH_UTIL_H_
#include <xmmintrin.h>
@@ -36,4 +36,4 @@ void LoadDefaultSSEState();
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
-#endif
+#endif // _MATH_UTIL_H_
diff --git a/Source/Core/Common/Src/MemArena.cpp b/Source/Core/Common/Src/MemArena.cpp
index 3a2d981985..028cd43bbb 100644
--- a/Source/Core/Common/Src/MemArena.cpp
+++ b/Source/Core/Common/Src/MemArena.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/MemArena.h b/Source/Core/Common/Src/MemArena.h
index a6651ea8bf..4605bc970e 100644
--- a/Source/Core/Common/Src/MemArena.h
+++ b/Source/Core/Common/Src/MemArena.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _MEMARENA_H
-#define _MEMARENA_H
+#ifndef _MEMARENA_H_
+#define _MEMARENA_H_
#ifdef _WIN32
#include <windows.h>
@@ -49,4 +49,4 @@ private:
#endif
};
-#endif
+#endif // _MEMARENA_H_
diff --git a/Source/Core/Common/Src/Misc.cpp b/Source/Core/Common/Src/Misc.cpp
index 15f79fe700..89d706f66b 100644
--- a/Source/Core/Common/Src/Misc.cpp
+++ b/Source/Core/Common/Src/Misc.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/MsgHandler.cpp b/Source/Core/Common/Src/MsgHandler.cpp
index f9e3625733..2282e76a8d 100644
--- a/Source/Core/Common/Src/MsgHandler.cpp
+++ b/Source/Core/Common/Src/MsgHandler.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -41,9 +41,8 @@ void SetEnableAlert(bool enable) {
correct windows is shown */
bool MsgAlert(const char* caption, bool yes_no, int Style, const char* format, ...)
{
- // ---------------------------------
+
// Read message and write it to the log
- // -----------
char buffer[2048];
bool ret = true;
@@ -75,4 +74,3 @@ bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no, int S
return true;
#endif
}
-
diff --git a/Source/Core/Common/Src/MsgHandler.h b/Source/Core/Common/Src/MsgHandler.h
index f94f484dc7..fe9322f6ef 100644
--- a/Source/Core/Common/Src/MsgHandler.h
+++ b/Source/Core/Common/Src/MsgHandler.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef MSGHANDLER_H
-#define MSGHANDLER_H
+#ifndef _MSGHANDLER_H_
+#define _MSGHANDLER_H_
// Message alerts
enum MSG_TYPE
{
@@ -43,4 +43,4 @@ void SetEnableAlert(bool enable);
#define AskYesNo(format, ...) MsgAlert("Question", true, QUESTION, format, ##__VA_ARGS__)
#endif
-#endif //MSGHANDLER
+#endif // _MSGHANDLER_H_
diff --git a/Source/Core/Common/Src/Plugin.cpp b/Source/Core/Common/Src/Plugin.cpp
index 4ad3958ba8..52da33ff25 100644
--- a/Source/Core/Common/Src/Plugin.cpp
+++ b/Source/Core/Common/Src/Plugin.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,11 +15,11 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-////////////////////////////////////////////////
+// --------------------------------------------------------------------------------------------
// This is the common Plugin class that links to the functions that are
// common to all plugins. This class is inherited by all plugin classes. But it's only created
// directly in PluginManager.cpp when we check if a plugin is valid or not.
-///////////////////////////////////////////////
+// --------------------------------------------------------------------------------------------
#include "Plugin.h"
@@ -124,4 +124,4 @@ void CPlugin::Shutdown()
m_Shutdown();
}
-} // end of namespace Common
+} // Namespace
diff --git a/Source/Core/Common/Src/Plugin.h b/Source/Core/Common/Src/Plugin.h
index 5175c53513..47896f5a87 100644
--- a/Source/Core/Common/Src/Plugin.h
+++ b/Source/Core/Common/Src/Plugin.h
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _PLUGIN_H
-#define _PLUGIN_H
+#ifndef _PLUGIN_H_
+#define _PLUGIN_H_
#include "Common.h"
#include "PluginSpecs.h"
@@ -67,6 +67,6 @@ private:
TShutdown m_Shutdown;
TDoState m_DoState;
};
-} // end of namespace Common
+} // Namespace
-#endif
+#endif // _PLUGIN_H_
diff --git a/Source/Core/Common/Src/PluginDSP.cpp b/Source/Core/Common/Src/PluginDSP.cpp
index 5c5f8507be..91e938d033 100644
--- a/Source/Core/Common/Src/PluginDSP.cpp
+++ b/Source/Core/Common/Src/PluginDSP.cpp
@@ -1,3 +1,20 @@
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
#include "PluginDSP.h"
namespace Common {
diff --git a/Source/Core/Common/Src/PluginDSP.h b/Source/Core/Common/Src/PluginDSP.h
index 3b9a600bed..c485030d65 100644
--- a/Source/Core/Common/Src/PluginDSP.h
+++ b/Source/Core/Common/Src/PluginDSP.h
@@ -1,5 +1,22 @@
-#ifndef _PLUGINDSP_H
-#define _PLUGINDSP_H
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#ifndef _PLUGINDSP_H_
+#define _PLUGINDSP_H_
#include "pluginspecs_dsp.h"
#include "Plugin.h"
@@ -38,4 +55,4 @@ private:
} // namespace
-#endif
+#endif // _PLUGINDSP_H_
diff --git a/Source/Core/Common/Src/PluginPAD.cpp b/Source/Core/Common/Src/PluginPAD.cpp
index a85e74cfa0..0eb96b7281 100644
--- a/Source/Core/Common/Src/PluginPAD.cpp
+++ b/Source/Core/Common/Src/PluginPAD.cpp
@@ -1,3 +1,20 @@
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
#include "PluginPAD.h"
namespace Common
@@ -21,4 +38,4 @@ namespace Common
}
PluginPAD::~PluginPAD() {}
-}
+} // Namespace
diff --git a/Source/Core/Common/Src/PluginPAD.h b/Source/Core/Common/Src/PluginPAD.h
index 13122503d9..29db050a50 100644
--- a/Source/Core/Common/Src/PluginPAD.h
+++ b/Source/Core/Common/Src/PluginPAD.h
@@ -1,5 +1,22 @@
-#ifndef _PLUGINPAD_H
-#define _PLUGINPAD_H
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#ifndef _PLUGINPAD_H_
+#define _PLUGINPAD_H_
#include "pluginspecs_pad.h"
#include "Plugin.h"
@@ -29,4 +46,4 @@ private:
} // namespace
-#endif
+#endif // _PLUGINPAD_H_
diff --git a/Source/Core/Common/Src/PluginVideo.cpp b/Source/Core/Common/Src/PluginVideo.cpp
index 4378f4a63a..96833da0ca 100644
--- a/Source/Core/Common/Src/PluginVideo.cpp
+++ b/Source/Core/Common/Src/PluginVideo.cpp
@@ -1,3 +1,20 @@
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
#include "PluginVideo.h"
namespace Common
diff --git a/Source/Core/Common/Src/PluginVideo.h b/Source/Core/Common/Src/PluginVideo.h
index a0b72b01c7..1721899b6d 100644
--- a/Source/Core/Common/Src/PluginVideo.h
+++ b/Source/Core/Common/Src/PluginVideo.h
@@ -1,5 +1,22 @@
-#ifndef _PLUGINVIDEO_H
-#define _PLUGINVIDEO_H
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#ifndef _PLUGINVIDEO_H_
+#define _PLUGINVIDEO_H_
#include "pluginspecs_video.h"
#include "Plugin.h"
@@ -36,4 +53,4 @@ private:
} // namespace
-#endif
+#endif // _PLUGINVIDEO_H_
diff --git a/Source/Core/Common/Src/PluginWiimote.cpp b/Source/Core/Common/Src/PluginWiimote.cpp
index 17a04b8cd6..aa3a0e94ed 100644
--- a/Source/Core/Common/Src/PluginWiimote.cpp
+++ b/Source/Core/Common/Src/PluginWiimote.cpp
@@ -1,3 +1,20 @@
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
#include "PluginWiimote.h"
namespace Common {
@@ -21,7 +38,6 @@ PluginWiimote::PluginWiimote(const char *_Filename)
validWiimote = true;
}
-PluginWiimote::~PluginWiimote() {
-}
+PluginWiimote::~PluginWiimote() { }
-}
+} // Namespace
diff --git a/Source/Core/Common/Src/PluginWiimote.h b/Source/Core/Common/Src/PluginWiimote.h
index 3572dddc7c..038f1f5049 100644
--- a/Source/Core/Common/Src/PluginWiimote.h
+++ b/Source/Core/Common/Src/PluginWiimote.h
@@ -1,5 +1,22 @@
-#ifndef _PLUGINWIIMOTE_H
-#define _PLUGINWIIMOTE_H
+// Copyright (C) 2003-2009 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#ifndef _PLUGINWIIMOTE_H_
+#define _PLUGINWIIMOTE_H_
#include "pluginspecs_wiimote.h"
#include "Plugin.h"
@@ -29,4 +46,4 @@ private:
} // namespace
-#endif
+#endif // _PLUGINWIIMOTE_H_
diff --git a/Source/Core/Common/Src/Setup.h b/Source/Core/Common/Src/Setup.h
index d9cae94809..0b9ed0a3fe 100644
--- a/Source/Core/Common/Src/Setup.h
+++ b/Source/Core/Common/Src/Setup.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,23 +15,19 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef __SETUP_h__
-#define __SETUP_h__
+#ifndef _SETUP_H_
+#define _SETUP_H_
-////////////////////////////////////////////////////////////////////////////////////////
-// File description
-/* ŻŻŻŻŻŻŻŻŻŻŻŻ
+// -----------------------------------------------------------------------------------------------------
+// File description:
+// Compilation settings. I avoid placing this in Common.h or some place where lots of files needs
+// to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible.
+// This file can be kept on the ignore list in your SVN program. It allows local optional settings
+// depending on what works on your computer.
+// -----------------------------------------------------------------------------------------------------
- Compilation settings. I avoid placing this in Common.h or some place where lots of files needs
- to be rebuilt if any of these settings are changed. I'd rather have it in as few files as possible.
- This file can be kept on the ignore list in your SVN program. It allows local optional settings
- depending on what works on your computer.
-
-////////////////////////*/
-
-////////////////////////////////////////////////////////////////////////////////////////
-// Settings
-// ŻŻŻŻŻŻŻŻŻŻŻŻ
+// -----------------------------------------------------------------------------------------------------
+// Settings:
// This may remove sound artifacts in Wario Land Shake It and perhaps other games
//#define SETUP_AVOID_SOUND_ARTIFACTS
@@ -64,7 +60,7 @@
// Build with music modification
//#define MUSICMOD
-///////////////////////////
+// -----------------------------------------------------------------------------------------------------
-#endif // __SETUP_h__
+#endif // _SETUP_H_
diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp
index 483a704aee..4de1fa71cc 100644
--- a/Source/Core/Common/Src/StringUtil.cpp
+++ b/Source/Core/Common/Src/StringUtil.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -66,10 +66,7 @@ bool AsciiToHex(const char* _szValue, u32& result)
return (true);
}
-
-//////////////////////////////////////////////////////////////////////////////////////////
// Convert AB to it's ascii table entry numbers 0x4142
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻ
u32 Ascii2Hex(std::string _Text)
{
// Reset the return value zero
@@ -100,8 +97,6 @@ std::string Hex2Ascii(u32 _Text)
std::string StrResult = Result;
return StrResult;
}
-///////////////////////////
-
bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list args)
{
@@ -119,7 +114,6 @@ bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list ar
}
}
-
// Expensive!
void ToStringFromFormat(std::string* out, const char* format, ...)
{
@@ -183,9 +177,7 @@ std::string StringFromFormat(const char* format, ...)
}
-// ===================================================
-/* For Debugging. Read out an u8 array. */
-// ----------------
+// For Debugging. Read out an u8 array.
std::string ArrayToString(const u8 *data, u32 size, u32 offset, int line_len, bool Spaces)
{
std::string Tmp, Spc;
@@ -197,8 +189,6 @@ std::string ArrayToString(const u8 *data, u32 size, u32 offset, int line_len, bo
}
return Tmp;
}
-// ================
-
// Turns " hej " into "hej". Also handles tabs.
std::string StripSpaces(const std::string &str)
@@ -459,5 +449,3 @@ std::string ThS(int Integer, bool Unsigned)
}
return sbuf;
}
-
-
diff --git a/Source/Core/Common/Src/StringUtil.h b/Source/Core/Common/Src/StringUtil.h
index 2ecb1e793f..3dc1eebe98 100644
--- a/Source/Core/Common/Src/StringUtil.h
+++ b/Source/Core/Common/Src/StringUtil.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _STRINGUTIL_H
-#define _STRINGUTIL_H
+#ifndef _STRINGUTIL_H_
+#define _STRINGUTIL_H_
#include <stdarg.h>
@@ -75,4 +75,4 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _
void BuildCompleteFilename(std::string& _CompleteFilename, const std::string& _Path, const std::string& _Filename);
-#endif
+#endif // _STRINGUTIL_H_
diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp
index d601dfef3c..1921e5719d 100644
--- a/Source/Core/Common/Src/Thread.cpp
+++ b/Source/Core/Common/Src/Thread.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -18,14 +18,11 @@
#include "Setup.h"
#include "Thread.h"
#include "Log.h"
-// -----------------------------------------
#ifdef SETUP_TIMER_WAITING
-// -----------------
#include <windows.h>
#include "ConsoleWindow.h"
EventCallBack FunctionPointer[10];
#endif
-// ------------------------
namespace Common
{
@@ -68,7 +65,6 @@ void CriticalSection::Leave()
LeaveCriticalSection(&section);
}
-
Thread::Thread(ThreadFunc function, void* arg)
: m_hThread(NULL), m_threadId(0)
{
@@ -106,10 +102,7 @@ void Thread::SetCurrentThreadAffinity(int mask)
SetThreadAffinityMask(GetCurrentThread(), mask);
}
-
-//////////////////////////////////////////////////////////////////////////////////////////
// Regular same thread loop based waiting
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Event::Event()
{
m_hEvent = 0;
@@ -186,14 +179,9 @@ void Event::MsgWait()
}
}
-/////////////////////////////////////
-
-
-//////////////////////////////////////////////////////////////////////////////////////////
/* Separate thread timer based waiting, instead of same thread loop waiting. The downside with this
is that it's less convenient to use because we can't stall any threads with a loop. The positive
is that we don't cause these incredibly annoying WaitForEternity() hangings. */
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
#ifdef SETUP_TIMER_WAITING
/* I could not figure out how to place this in the class to, CreateTimerQueueTimer() would complain
about some kind of type casting, anyone have any ideas about how to do it? */
@@ -280,14 +268,8 @@ void Event::SetTimer()
if (StartWait) DoneWaiting = true;
}
#endif
-////////////////////////////////////////
-
-
-//////////////////////////////////////////////////////////////////////////////////////////
// Supporting functions
-// ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
-
void SleepCurrentThread(int ms)
{
Sleep(ms);
@@ -350,8 +332,6 @@ LONG SyncInterlockedExchange(LONG *Dest, LONG Val)
{
return InterlockedExchange(Dest, Val);
}
-////////////////////////////////////////
-
#else // !WIN32, so must be POSIX threads
@@ -572,4 +552,4 @@ LONG SyncInterlockedExchange(LONG *Dest, LONG Val)
#endif
-} // end of namespace Common
+} // namespace Common
diff --git a/Source/Core/Common/Src/Thread.h b/Source/Core/Common/Src/Thread.h
index 83e5ec2d11..8a0fb88669 100644
--- a/Source/Core/Common/Src/Thread.h
+++ b/Source/Core/Common/Src/Thread.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,12 +15,9 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _THREAD_H
-#define _THREAD_H
+#ifndef _THREAD_H_
+#define _THREAD_H_
-//////////////////////////////////////////////////////////////////////////////////////////
-// Includes
-// ------------
#ifdef _WIN32
#include <windows.h>
#define THREAD_RETURN DWORD WINAPI
@@ -39,9 +36,6 @@
#include <stdio.h>
#include <string.h>
-/////////////////////////////////////////////////////////////////////////////////////////
-// Definitions
-// ------------
// This may not be defined outside _WIN32
#ifndef _WIN32
#ifndef INFINITE
@@ -124,9 +118,7 @@ public:
void MsgWait() {Wait();}
#endif
- // -----------------------------------------
#ifdef SETUP_TIMER_WAITING
- // -----------------
bool TimerWait(EventCallBack WaitCB, int Id = 0, bool OptCondition = true);
bool DoneWait();
void SetTimer();
@@ -136,7 +128,6 @@ public:
HANDLE hTimer;
HANDLE hTimerQueue;
#endif
- // ---------------------------
private:
#ifdef _WIN32
@@ -163,6 +154,6 @@ LONG SyncInterlockedExchangeAdd(LONG *Dest, LONG Val);
LONG SyncInterlockedExchange(LONG *Dest, LONG Val);
LONG SyncInterlockedIncrement(LONG *Dest);
-} // end of namespace Common
+} // namespace Common
-#endif
+#endif // _STRINGUTIL_H_
diff --git a/Source/Core/Common/Src/Thunk.cpp b/Source/Core/Common/Src/Thunk.cpp
index a37d88b24c..4f2178113b 100644
--- a/Source/Core/Common/Src/Thunk.cpp
+++ b/Source/Core/Common/Src/Thunk.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/Thunk.h b/Source/Core/Common/Src/Thunk.h
index 05960d19eb..2e55187747 100644
--- a/Source/Core/Common/Src/Thunk.h
+++ b/Source/Core/Common/Src/Thunk.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _THUNK_H
-#define _THUNK_H
+#ifndef _THUNK_H_
+#define _THUNK_H_
#include <map>
@@ -52,4 +52,4 @@ public:
extern ThunkManager thunks;
-#endif
+#endif // _THUNK_H_
diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp
index ad0016b3f2..8b355ff0d4 100644
--- a/Source/Core/Common/Src/Timer.cpp
+++ b/Source/Core/Common/Src/Timer.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -39,9 +39,9 @@ u32 timeGetTime()
namespace Common
{
-//////////////////////////////////////////////////////////////////////////////////////////
+// --------------------------------------------
// Initiate, Start, Stop, and Update the time
-// ---------------
+// --------------------------------------------
// Set initial values for the class
Timer::Timer()
@@ -75,13 +75,12 @@ void Timer::Update()
m_LastTime = timeGetTime();
//TODO(ector) - QPF
}
-/////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////////////
+// -------------------------------------
// Get time difference and elapsed time
-// ---------------
+// -------------------------------------
// Get the number of milliseconds since the last Update()
s64 Timer::GetTimeDifference()
@@ -138,13 +137,7 @@ std::string Timer::GetTimeElapsedFormatted() const
return TmpStr;
}
-/////////////////////////////////////
-
-
-
-//////////////////////////////////////////////////////////////////////////////////////////
// Get current time
-// ---------------
void Timer::IncreaseResolution()
{
#ifdef _WIN32
@@ -212,4 +205,4 @@ std::string Timer::GetTimeFormatted()
return std::string(formattedTime);
}
-} // end of namespace Common
+} // Namespace Common
diff --git a/Source/Core/Common/Src/Timer.h b/Source/Core/Common/Src/Timer.h
index c249057493..0ee730df96 100644
--- a/Source/Core/Common/Src/Timer.h
+++ b/Source/Core/Common/Src/Timer.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _TIMER_H
-#define _TIMER_H
+#ifndef _TIMER_H_
+#define _TIMER_H_
#include "Common.h"
#include <string>
@@ -53,10 +53,10 @@ public:
bool m_Running;
};
-} // end of namespace Common
+} // Namespace Common
#ifdef __GNUC__
u32 timeGetTime();
-#endif
+#endif // GNUC
-#endif
+#endif // _TIMER_H_
diff --git a/Source/Core/Common/Src/stdafx.cpp b/Source/Core/Common/Src/stdafx.cpp
deleted file mode 100644
index 1dc71df3a9..0000000000
--- a/Source/Core/Common/Src/stdafx.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (C) 2003-2008 Dolphin Project.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, version 2.0.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License 2.0 for more details.
-
-// A copy of the GPL 2.0 should have been included with the program.
-// If not, see http://www.gnu.org/licenses/
-
-// Official SVN repository and contact information can be found at
-// http://code.google.com/p/dolphin-emu/
-
-#include "stdafx.h"
diff --git a/Source/Core/Common/Src/stdafx.h b/Source/Core/Common/Src/stdafx.h
deleted file mode 100644
index 546a643aae..0000000000
--- a/Source/Core/Common/Src/stdafx.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2003-2008 Dolphin Project.
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, version 2.0.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License 2.0 for more details.
-
-// A copy of the GPL 2.0 should have been included with the program.
-// If not, see http://www.gnu.org/licenses/
-
-// Official SVN repository and contact information can be found at
-// http://code.google.com/p/dolphin-emu/
-
-#pragma once
-
-#ifndef _WIN32_WINNT
- #define _WIN32_WINNT 0x501
-#endif
-#ifndef _WIN32_IE
-#define _WIN32_IE 0x0500 // Default value is 0x0400
-#endif
-
-#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-
-#define _CRT_SECURE_NO_DEPRECATE 1
-#define _CRT_NONSTDC_NO_DEPRECATE 1
-
-#include <windows.h>
-#include <tchar.h>
-#include <vector>
-
diff --git a/Source/Core/Common/Src/x64Analyzer.cpp b/Source/Core/Common/Src/x64Analyzer.cpp
index 7c11f7c1f5..c4996bb5f3 100644
--- a/Source/Core/Common/Src/x64Analyzer.cpp
+++ b/Source/Core/Common/Src/x64Analyzer.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -14,6 +14,7 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
+
#include "x64Analyzer.h"
bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int accessType)
@@ -227,6 +228,3 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
info.instructionSize = (int)(codePtr - startCodePtr);
return true;
}
-
-
-
diff --git a/Source/Core/Common/Src/x64Analyzer.h b/Source/Core/Common/Src/x64Analyzer.h
index e65a0d4319..45ce34ac45 100644
--- a/Source/Core/Common/Src/x64Analyzer.h
+++ b/Source/Core/Common/Src/x64Analyzer.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -14,8 +14,9 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-#ifndef _X64ANALYZER_H
-#define _X64ANALYZER_H
+
+#ifndef _X64ANALYZER_H_
+#define _X64ANALYZER_H_
#include "Common.h"
@@ -53,4 +54,4 @@ enum AccessType{
bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int accessType);
-#endif
+#endif // _X64ANALYZER_H_
diff --git a/Source/Core/Common/Src/x64Emitter.cpp b/Source/Core/Common/Src/x64Emitter.cpp
index 958e5d7aeb..afc90206ed 100644
--- a/Source/Core/Common/Src/x64Emitter.cpp
+++ b/Source/Core/Common/Src/x64Emitter.cpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/Source/Core/Common/Src/x64Emitter.h b/Source/Core/Common/Src/x64Emitter.h
index b4b809770c..fce978dc6f 100644
--- a/Source/Core/Common/Src/x64Emitter.h
+++ b/Source/Core/Common/Src/x64Emitter.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2008 Dolphin Project.
+// Copyright (C) 2003-2009 Dolphin Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
// WARNING - THIS LIBRARY IS NOT THREAD SAFE!!!
-#ifndef _DOLPHIN_INTEL_CODEGEN
-#define _DOLPHIN_INTEL_CODEGEN
+#ifndef _DOLPHIN_INTEL_CODEGEN_
+#define _DOLPHIN_INTEL_CODEGEN_
#include "Common.h"
#include "MemoryUtil.h"
@@ -721,4 +721,4 @@ public:
} // namespace
-#endif
+#endif // _DOLPHIN_INTEL_CODEGEN_