diff --git a/SharedFiles/output_formatter.cpp b/SharedFiles/output_formatter.cpp index 99edcf9390331571dbb4fae3bdde5ec96ddfe300..14eb1ccf9f16122454bf5de4098872391e2d25ec 100644 --- a/SharedFiles/output_formatter.cpp +++ b/SharedFiles/output_formatter.cpp @@ -3,6 +3,14 @@ #include <fstream> #include <time.h> +#if defined(_WIN32) || defined(_WIN64) +#include <winsock.h> +#include <tchar.h> +#else +#include <unistd.h> +#include <string.h> +#endif + namespace formatted_output { @@ -10,8 +18,8 @@ namespace formatted_output { c_OutputField::c_OutputField(int pos, const std::string& header_line, c_OutputController* ctlr) : i_pos(pos), - i_width(-1), b_print(true), + i_width(-1), c_fill(' ') { if (!p_ctlr) @@ -235,19 +243,12 @@ namespace formatted_output { : c_OutputField(pos, header_line) {} -#if defined(_WIN32) || defined(_WIN64) -#include <Windows.h> -#include <tchar.h> -#else -#include <unistd.h> -#include <string.h> -#endif void c_HostnameField::Output(ostream& stream) const { char Name[150]; int i = 0; -#ifdef WIN32 +#if defined(_WIN32) || defined(_WIN64) TCHAR infoBuf[150]; DWORD bufCharCount = 150; memset(Name, 0, 150); diff --git a/SharedFiles/output_formatter.h b/SharedFiles/output_formatter.h index 5f3043362389a7d55ab8d0b3c9541159d626efe2..f08d153238e1b0588945131f5a6886c4814c17f0 100644 --- a/SharedFiles/output_formatter.h +++ b/SharedFiles/output_formatter.h @@ -6,7 +6,9 @@ #include <vector> #include <iostream> -#include "timeinfo.h" +#include "stopwatch.h" + +typedef c_Stopwatch c_TimeInfo; namespace formatted_output {