diff options
Diffstat (limited to 'src/tool/eathena-monitor.cpp')
-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') && |