]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4566 --resolve Show fs_cli banner in color(windows)
authorJeff Lenk <jeff@jefflenk.com>
Mon, 3 Sep 2012 02:57:20 +0000 (21:57 -0500)
committerJeff Lenk <jeff@jefflenk.com>
Mon, 3 Sep 2012 02:57:20 +0000 (21:57 -0500)
libs/esl/fs_cli.c

index a98432796373286a0b279b2a35ebb7d38ad6c4cd..95629da76e3eeb75e129de890c61f1cbdfdbbe0c 100644 (file)
@@ -926,7 +926,14 @@ static void print_banner(FILE *stream)
 #include <cc.h>
 
 #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",