From 7abb5f7604bb9a0a716e89f3b27e330b016a38b9 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 23 Sep 2012 21:23:33 +0000 Subject: [PATCH] Source files cleanup: OSSupport-related files in a separate subfolder, renamed. git-svn-id: http://mc-server.googlecode.com/svn/trunk@885 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- VC2008/MCServer.vcproj | 54 +++++++++---------- source/AllToLua.pkg | 2 +- source/Bindings.cpp | 4 +- source/Bindings.h | 2 +- source/ChunkSender.h | 2 +- source/Generating/ChunkGenerator.h | 2 +- source/Globals.h | 12 ++--- source/LightingThread.h | 2 +- .../BlockingTCPLink.cpp} | 2 +- .../BlockingTCPLink.h} | 2 +- .../CriticalSection.cpp} | 2 +- .../CriticalSection.h} | 0 source/{cEvent.cpp => OSSupport/Event.cpp} | 4 +- source/{cEvent.h => OSSupport/Event.h} | 2 +- source/{cFile.cpp => OSSupport/File.cpp} | 2 +- source/{cFile.h => OSSupport/File.h} | 0 .../{cIsThread.cpp => OSSupport/IsThread.cpp} | 4 +- source/{cIsThread.h => OSSupport/IsThread.h} | 2 +- .../{cMakeDir.cpp => OSSupport/MakeDir.cpp} | 2 +- source/{cMakeDir.h => OSSupport/MakeDir.h} | 0 .../Semaphore.cpp} | 0 .../{cSemaphore.h => OSSupport/Semaphore.h} | 0 source/{cSleep.cpp => OSSupport/Sleep.cpp} | 0 source/{cSleep.h => OSSupport/Sleep.h} | 0 source/{cSocket.cpp => OSSupport/Socket.cpp} | 2 +- source/{cSocket.h => OSSupport/Socket.h} | 0 .../SocketThreads.cpp} | 3 +- .../SocketThreads.h} | 6 +-- .../{cTCPLink.cpp => OSSupport/TCPLink.cpp} | 3 +- source/{cTCPLink.h => OSSupport/TCPLink.h} | 2 +- source/{cThread.cpp => OSSupport/Thread.cpp} | 0 source/{cThread.h => OSSupport/Thread.h} | 0 source/{cTimer.cpp => OSSupport/Timer.cpp} | 2 +- source/{cTimer.h => OSSupport/Timer.h} | 0 source/WorldStorage/WSSAnvil.cpp | 2 +- source/WorldStorage/WorldStorage.h | 2 +- source/cAuthenticator.cpp | 2 +- source/cAuthenticator.h | 2 +- source/cChunkMap.cpp | 1 - source/cClientHandle.cpp | 6 +-- source/cClientHandle.h | 2 +- source/cHeartBeat.cpp | 1 - source/cHeartBeat.h | 2 +- source/cLog.cpp | 9 ++-- source/cPlayer.cpp | 4 +- source/cRedstoneSimulator.cpp | 1 - source/cServer.cpp | 4 +- source/cServer.h | 2 +- source/cWebAdmin.h | 2 +- source/cWorld.cpp | 2 +- 50 files changed, 78 insertions(+), 86 deletions(-) rename source/{cBlockingTCPLink.cpp => OSSupport/BlockingTCPLink.cpp} (98%) rename source/{cBlockingTCPLink.h => OSSupport/BlockingTCPLink.h} (96%) rename source/{cCriticalSection.cpp => OSSupport/CriticalSection.cpp} (99%) rename source/{cCriticalSection.h => OSSupport/CriticalSection.h} (100%) rename source/{cEvent.cpp => OSSupport/Event.cpp} (98%) rename source/{cEvent.h => OSSupport/Event.h} (97%) rename source/{cFile.cpp => OSSupport/File.cpp} (99%) rename source/{cFile.h => OSSupport/File.h} (100%) rename source/{cIsThread.cpp => OSSupport/IsThread.cpp} (98%) rename source/{cIsThread.h => OSSupport/IsThread.h} (99%) rename source/{cMakeDir.cpp => OSSupport/MakeDir.cpp} (95%) rename source/{cMakeDir.h => OSSupport/MakeDir.h} (100%) rename source/{cSemaphore.cpp => OSSupport/Semaphore.cpp} (100%) rename source/{cSemaphore.h => OSSupport/Semaphore.h} (100%) rename source/{cSleep.cpp => OSSupport/Sleep.cpp} (100%) rename source/{cSleep.h => OSSupport/Sleep.h} (100%) rename source/{cSocket.cpp => OSSupport/Socket.cpp} (99%) rename source/{cSocket.h => OSSupport/Socket.h} (100%) rename source/{cSocketThreads.cpp => OSSupport/SocketThreads.cpp} (99%) rename source/{cSocketThreads.h => OSSupport/SocketThreads.h} (98%) rename source/{cTCPLink.cpp => OSSupport/TCPLink.cpp} (97%) rename source/{cTCPLink.h => OSSupport/TCPLink.h} (97%) rename source/{cThread.cpp => OSSupport/Thread.cpp} (100%) rename source/{cThread.h => OSSupport/Thread.h} (100%) rename source/{cTimer.cpp => OSSupport/Timer.cpp} (97%) rename source/{cTimer.h => OSSupport/Timer.h} (100%) diff --git a/VC2008/MCServer.vcproj b/VC2008/MCServer.vcproj index 66e2e457b..2acef09df 100644 --- a/VC2008/MCServer.vcproj +++ b/VC2008/MCServer.vcproj @@ -1113,110 +1113,110 @@ diff --git a/source/cSocket.h b/source/OSSupport/Socket.h similarity index 100% rename from source/cSocket.h rename to source/OSSupport/Socket.h diff --git a/source/cSocketThreads.cpp b/source/OSSupport/SocketThreads.cpp similarity index 99% rename from source/cSocketThreads.cpp rename to source/OSSupport/SocketThreads.cpp index e1fdd8f24..ae23b4496 100644 --- a/source/cSocketThreads.cpp +++ b/source/OSSupport/SocketThreads.cpp @@ -6,8 +6,7 @@ // For more detail, see http://forum.mc-server.org/showthread.php?tid=327 #include "Globals.h" -#include "cSocketThreads.h" -#include "cClientHandle.h" +#include "SocketThreads.h" diff --git a/source/cSocketThreads.h b/source/OSSupport/SocketThreads.h similarity index 98% rename from source/cSocketThreads.h rename to source/OSSupport/SocketThreads.h index 4f4e4bbe6..4683e0e4d 100644 --- a/source/cSocketThreads.h +++ b/source/OSSupport/SocketThreads.h @@ -1,5 +1,5 @@ -// cSocketThreads.h +// SocketThreads.h // Interfaces to the cSocketThreads class representing the heart of MCS's client networking. // This object takes care of network communication, groups sockets into threads and uses as little threads as possible for full read / write support @@ -30,8 +30,8 @@ This means that the socket can be written to several times before finally closin #ifndef CSOCKETTHREADS_H_INCLUDED #define CSOCKETTHREADS_H_INCLUDED -#include "cSocket.h" -#include "cIsThread.h" +#include "Socket.h" +#include "IsThread.h" diff --git a/source/cTCPLink.cpp b/source/OSSupport/TCPLink.cpp similarity index 97% rename from source/cTCPLink.cpp rename to source/OSSupport/TCPLink.cpp index 22151b32a..d4c423b94 100644 --- a/source/cTCPLink.cpp +++ b/source/OSSupport/TCPLink.cpp @@ -1,8 +1,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules -#include "cTCPLink.h" -#include "cSocket.h" +#include "TCPLink.h" diff --git a/source/cTCPLink.h b/source/OSSupport/TCPLink.h similarity index 97% rename from source/cTCPLink.h rename to source/OSSupport/TCPLink.h index 0bba84243..7fca10d7f 100644 --- a/source/cTCPLink.h +++ b/source/OSSupport/TCPLink.h @@ -1,6 +1,6 @@ #pragma once -#include "cSocket.h" +#include "Socket.h" class cTCPLink //tolua_export { //tolua_export diff --git a/source/cThread.cpp b/source/OSSupport/Thread.cpp similarity index 100% rename from source/cThread.cpp rename to source/OSSupport/Thread.cpp diff --git a/source/cThread.h b/source/OSSupport/Thread.h similarity index 100% rename from source/cThread.h rename to source/OSSupport/Thread.h diff --git a/source/cTimer.cpp b/source/OSSupport/Timer.cpp similarity index 97% rename from source/cTimer.cpp rename to source/OSSupport/Timer.cpp index a68ad2480..ab7325b5e 100644 --- a/source/cTimer.cpp +++ b/source/OSSupport/Timer.cpp @@ -1,7 +1,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules -#include "cTimer.h" +#include "Timer.h" diff --git a/source/cTimer.h b/source/OSSupport/Timer.h similarity index 100% rename from source/cTimer.h rename to source/OSSupport/Timer.h diff --git a/source/WorldStorage/WSSAnvil.cpp b/source/WorldStorage/WSSAnvil.cpp index e10c0e99a..b39dee7c7 100644 --- a/source/WorldStorage/WSSAnvil.cpp +++ b/source/WorldStorage/WSSAnvil.cpp @@ -15,7 +15,7 @@ #include "../cItem.h" #include "../StringCompression.h" #include "../cEntity.h" -#include "../cMakeDir.h" +#include "../OSSupport/MakeDir.h" #include "FastNBT.h" diff --git a/source/WorldStorage/WorldStorage.h b/source/WorldStorage/WorldStorage.h index 117def9b5..064b2ffaf 100644 --- a/source/WorldStorage/WorldStorage.h +++ b/source/WorldStorage/WorldStorage.h @@ -15,7 +15,7 @@ #define WORLDSTORAGE_H_INCLUDED #include "../ChunkDef.h" -#include "../cIsThread.h" +#include "../OSSupport/IsThread.h" #include diff --git a/source/cAuthenticator.cpp b/source/cAuthenticator.cpp index 9d06e7f40..171c90598 100644 --- a/source/cAuthenticator.cpp +++ b/source/cAuthenticator.cpp @@ -2,7 +2,7 @@ #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "cAuthenticator.h" -#include "cBlockingTCPLink.h" +#include "OSSupport/BlockingTCPLink.h" #include "cRoot.h" #include "cServer.h" diff --git a/source/cAuthenticator.h b/source/cAuthenticator.h index 4d0bd1bbb..c9e647329 100644 --- a/source/cAuthenticator.h +++ b/source/cAuthenticator.h @@ -14,7 +14,7 @@ #ifndef CAUTHENTICATOR_H_INCLUDED #define CAUTHENTICATOR_H_INCLUDED -#include "cIsThread.h" +#include "OSSupport/IsThread.h" diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp index 7c85e5994..a53357c50 100644 --- a/source/cChunkMap.cpp +++ b/source/cChunkMap.cpp @@ -4,7 +4,6 @@ #include "cChunkMap.h" #include "cWorld.h" #include "cRoot.h" -#include "cMakeDir.h" #include "cPlayer.h" #include "BlockID.h" #include "cItem.h" diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 0212bd3b2..a910d53d7 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -21,8 +21,8 @@ #include "cPiston.h" #include "Mobs/Monster.h" #include "cChatColor.h" -#include "cSocket.h" -#include "cTimer.h" +#include "OSSupport/Socket.h" +#include "OSSupport/Timer.h" #include "items/Item.h" #include "blocks/Block.h" #include "ChunkDataSerializer.h" @@ -31,10 +31,8 @@ #include "Vector3f.h" #include "Vector3d.h" -#include "cSleep.h" #include "cRoot.h" -#include "cBlockingTCPLink.h" #include "cAuthenticator.h" #include "MersenneTwister.h" diff --git a/source/cClientHandle.h b/source/cClientHandle.h index 78c6a1289..83d0fd9c0 100644 --- a/source/cClientHandle.h +++ b/source/cClientHandle.h @@ -13,7 +13,7 @@ #include "Defines.h" #include "Vector3d.h" -#include "cSocketThreads.h" +#include "OSSupport/SocketThreads.h" #include "ChunkDef.h" #include "ByteBuffer.h" diff --git a/source/cHeartBeat.cpp b/source/cHeartBeat.cpp index 5ac119593..1cff0abb2 100644 --- a/source/cHeartBeat.cpp +++ b/source/cHeartBeat.cpp @@ -7,7 +7,6 @@ #include "cRoot.h" #include "cServer.h" -#include "cSleep.h" diff --git a/source/cHeartBeat.h b/source/cHeartBeat.h index 416494701..79465507c 100644 --- a/source/cHeartBeat.h +++ b/source/cHeartBeat.h @@ -1,7 +1,7 @@ #pragma once -#include "cTCPLink.h" +#include "OSSupport/TCPLink.h" diff --git a/source/cLog.cpp b/source/cLog.cpp index da95ee8cc..142aabe28 100644 --- a/source/cLog.cpp +++ b/source/cLog.cpp @@ -5,13 +5,12 @@ #include #include -#include "cMakeDir.h" - -#include "cIsThread.h" +#include "OSSupport/MakeDir.h" +#include "OSSupport/IsThread.h" #if defined(ANDROID_NDK) -#include -#include "ToJava.h" + #include + #include "ToJava.h" #endif diff --git a/source/cPlayer.cpp b/source/cPlayer.cpp index 65132296f..1de9bf36a 100644 --- a/source/cPlayer.cpp +++ b/source/cPlayer.cpp @@ -16,8 +16,8 @@ #include "cItem.h" #include "cTracer.h" #include "cRoot.h" -#include "cMakeDir.h" -#include "cTimer.h" +#include "OSSupport/MakeDir.h" +#include "OSSupport/Timer.h" #include "MersenneTwister.h" #include "Vector3d.h" diff --git a/source/cRedstoneSimulator.cpp b/source/cRedstoneSimulator.cpp index 44a6bdb4c..8d46b1347 100644 --- a/source/cRedstoneSimulator.cpp +++ b/source/cRedstoneSimulator.cpp @@ -4,7 +4,6 @@ #include "cPiston.h" #include "cWorld.h" #include "BlockID.h" -#include "cCriticalSection.h" #include "cTorch.h" #include "cRedstone.h" diff --git a/source/cServer.cpp b/source/cServer.cpp index cd7710fb8..e8b58c756 100644 --- a/source/cServer.cpp +++ b/source/cServer.cpp @@ -5,9 +5,9 @@ #include "cServer.h" #include "cClientHandle.h" -#include "cTimer.h" +#include "OSSupport/Timer.h" #include "Mobs/Monster.h" -#include "cSocket.h" +#include "OSSupport/Socket.h" #include "cRoot.h" #include "cWorld.h" #include "ChunkDef.h" diff --git a/source/cServer.h b/source/cServer.h index 9dd087299..b3599aa1e 100644 --- a/source/cServer.h +++ b/source/cServer.h @@ -11,7 +11,7 @@ #ifndef CSERVER_H_INCLUDED #define CSERVER_H_INCLUDED -#include "cSocketThreads.h" +#include "OSSupport/SocketThreads.h" #include "CryptoPP/rsa.h" #include "CryptoPP/randpool.h" diff --git a/source/cWebAdmin.h b/source/cWebAdmin.h index 8d4837e7a..f50de3f64 100644 --- a/source/cWebAdmin.h +++ b/source/cWebAdmin.h @@ -1,7 +1,7 @@ #pragma once #include "../WebServer/WebServer.h" -#include "cSocket.h" +#include "OSSupport/Socket.h" class cStringMap; diff --git a/source/cWorld.cpp b/source/cWorld.cpp index 533ee70cf..dd5f216d1 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -38,7 +38,7 @@ #include "Mobs/Ghast.h" #include "Mobs/Zombiepigman.h" -#include "cMakeDir.h" +#include "OSSupport/MakeDir.h" #include "MersenneTwister.h" #include "cTracer.h" #include "Generating/Trees.h"