summaryrefslogtreecommitdiffstats
path: root/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-02-10 13:34:22 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-02-10 14:23:51 +0100
commit1ac41cb08281bf5460dfea5fc40ff6f8e14873a1 (patch)
tree3926983e45afa7e805cca1429fc3452c57a5b6c3 /hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
parent13ec18b4b3ec8455daad674a0c0e616885b83608 (diff)
[HICN-49] Remove warnings hicn-light on windows
Change-Id: I106713c285ad5cc47cb5ae3aaf9c837685156e36 Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'hicn-light/src/command_line/daemon/hicnLightDaemon_main.c')
-rw-r--r--hicn-light/src/command_line/daemon/hicnLightDaemon_main.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
index 533bb9cf0..dac8ee89f 100644
--- a/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
+++ b/hicn-light/src/command_line/daemon/hicnLightDaemon_main.c
@@ -37,7 +37,6 @@
#include <src/core/forwarder.h>
static void _printRed(const char *output) {
-
#ifndef _WIN32
printf("\033[0;31m%s", output);
#else
@@ -45,21 +44,19 @@ static void _printRed(const char *output) {
WORD currentConsoleAttr;
CONSOLE_SCREEN_BUFFER_INFO csbi;
if (GetConsoleScreenBufferInfo(hConsole, &csbi))
- currentConsoleAttr = csbi.wAttributes;
+ currentConsoleAttr = csbi.wAttributes;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, 4);
printf("%s", output);
SetConsoleTextAttribute(hConsole, currentConsoleAttr);
#endif
-
}
static void _printWhite(const char *output) {
-
#ifndef _WIN32
- printf("\033[0m%s", output);
+ printf("\033[0m%s", output);
#else
- HANDLE hConsole = NULL;
+ HANDLE hConsole = NULL;
WORD currentConsoleAttr;
CONSOLE_SCREEN_BUFFER_INFO csbi;
if (GetConsoleScreenBufferInfo(hConsole, &csbi))
@@ -69,7 +66,6 @@ static void _printWhite(const char *output) {
printf("%s", output);
SetConsoleTextAttribute(hConsole, currentConsoleAttr);
#endif
-
}
static void _displayForwarderLogo(void) {
@@ -81,7 +77,9 @@ static void _displayForwarderLogo(void) {
_printWhite(" / _ \\ / // __// _ \\___/ // // _ `// _ \\/ __/\n");
_printRed("/_/ /____/(_)/_/ \\___/ ");
_printWhite("/_//_//_/ \\__//_//_/ /_//_/ \\_, //_//_/\\__/\n");
- _printWhite(" /___/ \n");
+ _printWhite(
+ " /___/ "
+ "\n");
printf("\n");
}