diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-16 17:47:51 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-12-24 10:02:00 -0800 |
commit | b52127bcbf817ff8285b36d22198b275327e16bb (patch) | |
tree | 7bc596289c011e719168bef846b8cf63bf5d4947 /src/tool | |
parent | 4bd7eeec09629d3c0f900d42c899fe23c69e07b6 (diff) | |
download | tmwa-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/tool')
-rw-r--r-- | src/tool/eathena-monitor.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/tool/eathena-monitor.cpp b/src/tool/eathena-monitor.cpp index bff8ab2..ff064c2 100644 --- a/src/tool/eathena-monitor.cpp +++ b/src/tool/eathena-monitor.cpp @@ -7,16 +7,17 @@ * gcc -o eathena-monitor eathena-monitor.c */ -#include <unistd.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> #include <sys/types.h> +#include <sys/wait.h> -#include <time.h> #include <fcntl.h> -#include <sys/wait.h> -#include <signal.h> +#include <unistd.h> + +#include <csignal> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <ctime> #define HOME getenv("HOME") #define LOGIN_SERVER "./login-server" @@ -27,7 +28,8 @@ #define SKIP_BLANK(ptr) ptr += skip_blank(ptr) -static inline size_t skip_blank(const char* ptr) { +static +size_t skip_blank(const char* ptr) { size_t i = 0; while ( (ptr[i] == ' ') || @@ -39,7 +41,8 @@ static inline size_t skip_blank(const char* ptr) { } #define GOTO_EQL(ptr) ptr += goto_eql(ptr) -static inline size_t goto_eql(const char* ptr) { +static +size_t goto_eql(const char* ptr) { size_t i = 0; while ( (ptr[i] != '\0') && @@ -51,7 +54,8 @@ static inline size_t goto_eql(const char* ptr) { } #define GOTO_EOL(ptr) ptr += goto_newline(ptr) -static inline size_t goto_newline(const char* ptr) { +static +size_t goto_newline(const char* ptr) { size_t i = 0; while ( (ptr[i] != '\0') && |