From: Jeff Lenk Date: Mon, 3 Sep 2012 02:57:20 +0000 (-0500) Subject: FS-4566 --resolve Show fs_cli banner in color(windows) X-Git-Tag: v1.2.3^2~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4e044e310b54ccf3a247bb144ff925554863bcb;p=thirdparty%2Ffreeswitch.git FS-4566 --resolve Show fs_cli banner in color(windows) --- diff --git a/libs/esl/fs_cli.c b/libs/esl/fs_cli.c index a984327963..95629da76e 100644 --- a/libs/esl/fs_cli.c +++ b/libs/esl/fs_cli.c @@ -926,7 +926,14 @@ static void print_banner(FILE *stream) #include #ifdef WIN32 - fprintf(stream, "%s%s\n%s\n", banner, cc, inf); + /* Print banner in yellow with blue background */ + SetConsoleTextAttribute(hStdout, ESL_SEQ_FYELLOW | BACKGROUND_BLUE); + WriteFile(hStdout, banner, (DWORD) strlen(banner), NULL, NULL); + WriteFile(hStdout, cc, (DWORD) strlen(cc), NULL, NULL); + SetConsoleTextAttribute(hStdout, wOldColorAttrs); + + /* Print the rest info in default colors */ + fprintf(stream, "\n%s\n", inf); #else fprintf(stream, "%s%s%s%s%s%s\n%s\n",