summaryrefslogtreecommitdiff
path: root/src/common/core.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-12-16 17:47:51 -0800
committerBen Longbons <b.r.longbons@gmail.com>2012-12-24 10:02:00 -0800
commitb52127bcbf817ff8285b36d22198b275327e16bb (patch)
tree7bc596289c011e719168bef846b8cf63bf5d4947 /src/common/core.cpp
parent4bd7eeec09629d3c0f900d42c899fe23c69e07b6 (diff)
downloadtmwa-b52127bcbf817ff8285b36d22198b275327e16bb.tar.gz
tmwa-b52127bcbf817ff8285b36d22198b275327e16bb.tar.bz2
tmwa-b52127bcbf817ff8285b36d22198b275327e16bb.tar.xz
tmwa-b52127bcbf817ff8285b36d22198b275327e16bb.zip
Cleanup headers and remove all uses of va_list except logging
Diffstat (limited to 'src/common/core.cpp')
-rw-r--r--src/common/core.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/common/core.cpp b/src/common/core.cpp
index 9d1d8e7..a6a170b 100644
--- a/src/common/core.cpp
+++ b/src/common/core.cpp
@@ -1,15 +1,18 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h>
+#include "core.hpp"
+
#include <sys/wait.h>
-#include "core.hpp"
+#include <unistd.h>
+
+#include <csignal>
+#include <cstdio>
+#include <cstdlib>
+
+#include "mt_rand.hpp"
+#include "nullpo.hpp"
#include "socket.hpp"
#include "timer.hpp"
#include "version.hpp"
-#include "mt_rand.hpp"
-#include "nullpo.hpp"
// Added by Gabuzomeu
//
@@ -18,7 +21,8 @@
// Programming in the UNIX Environment_.
//
typedef void(*sigfunc)(int);
-static sigfunc compat_signal(int signo, sigfunc func)
+static
+sigfunc compat_signal(int signo, sigfunc func)
{
struct sigaction sact, oact;
@@ -37,11 +41,13 @@ static sigfunc compat_signal(int signo, sigfunc func)
return oact.sa_handler;
}
-static void chld_proc(int UNUSED)
+static
+void chld_proc(int)
{
wait(NULL);
}
-static void sig_proc(int UNUSED)
+static
+void sig_proc(int)
{
for (int i = 1; i < 31; ++i)
compat_signal(i, SIG_IGN);