1
0

Fixed spaces around single-line comments.

There should be at least two spaces in front and one space after //-style comments.
This commit is contained in:
madmaxoft
2014-07-17 19:13:23 +02:00
parent 993fd14ddf
commit 7fff12bfac
34 changed files with 141 additions and 139 deletions

View File

@@ -3,17 +3,17 @@
#include "Root.h"
#include <exception> //std::exception
#include <csignal> //std::signal
#include <stdlib.h> //exit()
#include <exception>
#include <csignal>
#include <stdlib.h>
#ifdef _MSC_VER
#include <dbghelp.h>
#endif // _MSC_VER
// Here, we have some ALL CAPS variables, to give the impression that this is deeeep, gritty programming :P
bool g_TERMINATE_EVENT_RAISED = false; // If something has told the server to stop; checked periodically in cRoot
bool g_SERVER_TERMINATED = false; // Set to true when the server terminates, so our CTRL handler can then tell Windows to close the console
bool g_TERMINATE_EVENT_RAISED = false; // If something has told the server to stop; checked periodically in cRoot
bool g_SERVER_TERMINATED = false; // Set to true when the server terminates, so our CTRL handler can then tell Windows to close the console
@@ -76,7 +76,7 @@ void NonCtrlHandler(int a_Signal)
case SIGINT:
case SIGTERM:
{
std::signal(a_Signal, SIG_IGN); // Server is shutting down, wait for it...
std::signal(a_Signal, SIG_IGN); // Server is shutting down, wait for it...
break;
}
default: break;
@@ -158,9 +158,9 @@ BOOL CtrlHandler(DWORD fdwCtrlType)
g_TERMINATE_EVENT_RAISED = true;
LOGD("Terminate event raised from the Windows CtrlHandler");
if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
{
while (!g_SERVER_TERMINATED) { cSleep::MilliSleep(100); } // Delay as much as possible to try to get the server to shut down cleanly
while (!g_SERVER_TERMINATED) { cSleep::MilliSleep(100); } // Delay as much as possible to try to get the server to shut down cleanly
}
return TRUE;
@@ -233,7 +233,7 @@ int main( int argc, char **argv )
std::signal(SIGABRT, NonCtrlHandler);
#ifdef SIGABRT_COMPAT
std::signal(SIGABRT_COMPAT, NonCtrlHandler);
#endif // SIGABRT_COMPAT
#endif // SIGABRT_COMPAT
#endif
// DEBUG: test the dumpfile creation: