]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix color coding to be OS appropriate
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 16 Aug 2012 18:04:33 +0000 (13:04 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 16 Aug 2012 18:04:33 +0000 (13:04 -0500)
Makefile.am
build/Makefile.am
cluecon.tmpl
cluecon2.tmpl [new file with mode: 0644]
libs/esl/fs_cli.c
libs/esl/src/include/cc.h
src/include/cc.h
src/switch_core.c

index 1a0759b166560f8faafe49fb43c968e972bd73b1..673d29447c48c90cad8d91c59e23dee455733fc5 100644 (file)
@@ -659,7 +659,7 @@ cluecon:
        @clear
        @echo Thank you for updating. This is going to take a while so relax.
        @echo Now would be a good time to register for ClueCon!
-       @cat cluecon.tmpl
+       @cat cluecon2.tmpl
        @echo
        @echo http://www.cluecon.com
        @sleep 5
index e7c22a7640808826eff9f7b084ce372c48598e93..3feb22157d8c9907e2f5003445473296bb3a3c09 100644 (file)
@@ -11,7 +11,7 @@ all:
        @echo " + http://www.cluecon.com                        +"
        @echo " +                                               +"
        @echo " +-----------------------------------------------+"
-       @cat ../cluecon.tmpl
+       @cat ../cluecon2.tmpl
 
 install:
        @echo " +---------- FreeSWITCH install Complete ----------+"
@@ -69,7 +69,7 @@ install:
        @echo " +       http://www.cluecon.com                    +"
        @echo " +                                                 +"
        @echo " +-------------------------------------------------+"
-       @cat ../cluecon.tmpl
+       @cat ../cluecon2.tmpl
 
 
 .PHONY: check dvi html info install-data \
index f96668977c7b7875ae3fb20fb9881db3a00c1830..39cc3d1d65751348133dd149550db064b88e89f8 100644 (file)
@@ -1,4 +1,3 @@
-\e[01;44;33m
 .========================================================================================================.
 |    ____                       _____        ____ _             ____              _ _ _____              |
 |   / ___|___  _ __ ___   ___  |_   _|__    / ___| |_   _  ___ / ___|___  _ __   ( ) |___ /              |
@@ -25,5 +24,3 @@
 |    \_/\_/    \_/\_/    \_/\_/   (_)  \___|_|\__,_|\___|\___\___/|_| |_| (_)  \___\___/|_| |_| |_|      |
 |                                                                                                        |
 .========================================================================================================.
-\e[0m
-
diff --git a/cluecon2.tmpl b/cluecon2.tmpl
new file mode 100644 (file)
index 0000000..f966689
--- /dev/null
@@ -0,0 +1,29 @@
+\e[01;44;33m
+.========================================================================================================.
+|    ____                       _____        ____ _             ____              _ _ _____              |
+|   / ___|___  _ __ ___   ___  |_   _|__    / ___| |_   _  ___ / ___|___  _ __   ( ) |___ /              |
+|  | |   / _ \| '_ ` _ \ / _ \   | |/ _ \  | |   | | | | |/ _ \ |   / _ \| '_ \  |/| | |_ \              |
+|  | |__| (_) | | | | | |  __/   | | (_) | | |___| | |_| |  __/ |__| (_) | | | |   | |___) |             |
+|   \____\___/|_| |_| |_|\___|   |_|\___/   \____|_|\__,_|\___|\____\___/|_| |_|   |_|____/              |
+|                                                                                                        |
+|    ____ _     _                          _   _ ____    _                                               |
+|   / ___| |__ (_) ___ __ _  __ _  ___    | | | / ___|  / \                                              |
+|  | |   | '_ \| |/ __/ _` |/ _` |/ _ \   | | | \___ \ / _ \                                             |
+|  | |___| | | | | (_| (_| | (_| | (_) |  | |_| |___) / ___ \                                            |
+|   \____|_| |_|_|\___\__,_|\__, |\___( )  \___/|____/_/   \_\                                           |
+|                           |___/     |/                                                                 |
+|      _                         _      __   _   _                ___  _   _       ____   ___  _ _____   |
+|     / \  _   _  __ _ _   _ ___| |_   / /_ | |_| |__            ( _ )| |_| |__   |___ \ / _ \/ |___ /   |
+|    / _ \| | | |/ _` | | | / __| __| | '_ \| __| '_ \   _____   / _ \| __| '_ \    __) | | | | | |_ \   |
+|   / ___ \ |_| | (_| | |_| \__ \ |_  | (_) | |_| | | | |_____| | (_) | |_| | | |  / __/| |_| | |___) |  |
+|  /_/   \_\__,_|\__, |\__,_|___/\__|  \___/ \__|_| |_|          \___/ \__|_| |_| |_____|\___/|_|____/   |
+|                |___/                                                                                   |
+|                                           _                                                            |
+|  __      ____      ____      __       ___| |_   _  ___  ___ ___  _ __         ___ ___  _ __ ___        |
+|  \ \ /\ / /\ \ /\ / /\ \ /\ / /      / __| | | | |/ _ \/ __/ _ \| '_ \       / __/ _ \| '_ ` _ \       |
+|   \ V  V /  \ V  V /  \ V  V /   _  | (__| | |_| |  __/ (_| (_) | | | |  _  | (_| (_) | | | | | |      |
+|    \_/\_/    \_/\_/    \_/\_/   (_)  \___|_|\__,_|\___|\___\___/|_| |_| (_)  \___\___/|_| |_| |_|      |
+|                                                                                                        |
+.========================================================================================================.
+\e[0m
+
index 8532e233915b29a6d3868522f5f9daba6d232f0e..71579c4a7bb1fe161d2470e9ca777bd26ad221c3 100644 (file)
@@ -903,20 +903,21 @@ static const char *basic_gets(int *cnt)
 }
 
 static const char *banner =
-       "            _____ ____     ____ _     ___              \n"
-       "           |  ___/ ___|   / ___| |   |_ _|             \n"
-       "           | |_  \\___ \\  | |   | |    | |            \n"
-       "           |  _|  ___) | | |___| |___ | |              \n"
-       "           |_|   |____/   \\____|_____|___|            \n"
-       "\n"
-       "*******************************************************\n"
-       "* Anthony Minessale II, Ken Rice,                     *\n"
-       "* Michael Jerris, Travis Cross                        *\n"
-       "* FreeSWITCH (http://www.freeswitch.org)              *\n"
-       "* Paypal Donations Appreciated: paypal@freeswitch.org *\n"
-       "* Brought to you by ClueCon http://www.cluecon.com/   *\n"
-       "*******************************************************\n"
-       "\n";
+       ".=======================================================.\n"
+    "|            _____ ____     ____ _     ___              |\n"
+    "|           |  ___/ ___|   / ___| |   |_ _|             |\n"
+    "|           | |_  \\___ \\  | |   | |    | |              |\n"
+    "|           |  _|  ___) | | |___| |___ | |              |\n"
+    "|           |_|   |____/   \\____|_____|___|             |\n"
+       "|                                                       |\n"
+       ".=======================================================.\n"
+    "| Anthony Minessale II, Ken Rice,                       |\n"
+    "| Michael Jerris, Travis Cross                          |\n"
+    "| FreeSWITCH (http://www.freeswitch.org)                |\n"
+    "| Paypal Donations Appreciated: paypal@freeswitch.org   |\n"
+    "| Brought to you by ClueCon http://www.cluecon.com/     |\n"
+    ".=======================================================.\n"
+    "\n";
 
 static const char *inf = "Type /help <enter> to see a list of commands\n\n\n";
 
@@ -924,10 +925,16 @@ static void print_banner(FILE *stream)
 {
 #include <cc.h>
 
+       fprintf(stream,
+                       "%s%s%s%s%s%s\n%s\n", 
+                       ESL_SEQ_DEFAULT_COLOR,
+                       ESL_SEQ_FYELLOW, ESL_SEQ_BBLUE,
+                       banner,
+                       cc, ESL_SEQ_DEFAULT_COLOR, inf);
+
+
 #ifndef WIN32
-       fprintf(stream, "%s%s%s\n%s", output_text_color, banner, cc, inf);
-#else
-       fprintf(stream, "%s%s\n%s", banner, cc, inf);
+       fprintf(stream, "%s", output_text_color);
 #endif
 }
 
index 573a7f7332f18c923975e3d1218a7d32f0a60381..44666193c615e0a9f6ae398e4c690b20b6feeac0 100644 (file)
@@ -1,3 +1,2 @@
-
-const char *cc = "\e[01;44;33m\n.========================================================================================================.\n|    ____                       _____        ____ _             ____              _ _ ____               |\n|   / ___|___  _ __ ___   ___  |_   _|__    / ___| |_   _  ___ / ___|___  _ __   ( ) |___ \\              |\n|  | |   / _ \\| '_ ` _ \\ / _ \\   | |/ _ \\  | |   | | | | |/ _ \\ |   / _ \\| '_ \\  |/| | __) |             |\n|  | |__| (_) | | | | | |  __/   | | (_) | | |___| | |_| |  __/ |__| (_) | | | |   | |/ __/              |\n|   \\____\\___/|_| |_| |_|\\___|   |_|\\___/   \\____|_|\\__,_|\\___|\\____\\___/|_| |_|   |_|_____|             |\n|                                                                                                        |\n|    ____ _     _                              _   _ ____    _                                           |\n|   / ___| |__ (_) ___ __ _  __ _  ___        | | | / ___|  / \\                                          |\n|  | |   | '_ \\| |/ __/ _` |/ _` |/ _ \\       | | | \\___ \\ / _ \\                                         |\n|  | |___| | | | | (_| (_| | (_| | (_) |  _   | |_| |___) / ___ \\                                        |\n|   \\____|_| |_|_|\\___\\__,_|\\__, |\\___/  ( )   \\___/|____/_/   \\_\\                                       |\n|                           |___/        |/                                                              |\n|      _                         _     _____ _   _                ___  _   _       ____   ___  _ ____    |\n|     / \\  _   _  __ _ _   _ ___| |_  |___  | |_| |__            / _ \\| |_| |__   |___ \\ / _ \\/ |___ \\   |\n|    / _ \\| | | |/ _` | | | / __| __|    / /| __| '_ \\   _____  | (_) | __| '_ \\    __) | | | | | __) |  |\n|   / ___ \\ |_| | (_| | |_| \\__ \\ |_    / / | |_| | | | |_____|  \\__, | |_| | | |  / __/| |_| | |/ __/   |\n|  /_/   \\_\\__,_|\\__, |\\__,_|___/\\__|  /_/   \\__|_| |_|            /_/ \\__|_| |_| |_____|\\___/|_|_____|  |\n|                |___/                                                                                   |\n|                                           _                                                            |\n|  __      ____      ____      __       ___| |_   _  ___  ___ ___  _ __         ___ ___  _ __ ___        |\n|  \\ \\ /\\ / /\\ \\ /\\ / /\\ \\ /\\ / /      / __| | | | |/ _ \\/ __/ _ \\| '_ \\       / __/ _ \\| '_ ` _ \\       |\n|   \\ V  V /  \\ V  V /  \\ V  V /   _  | (__| | |_| |  __/ (_| (_) | | | |  _  | (_| (_) | | | | | |      |\n|    \\_/\\_/    \\_/\\_/    \\_/\\_/   (_)  \\___|_|\\__,_|\\___|\\___\\___/|_| |_| (_)  \\___\\___/|_| |_| |_|      |\n|                                                                                                        |\n.========================================================================================================.\n\e[0m\n";
+const char *cc = ".========================================================================================================.\n|    ____                       _____        ____ _             ____              _ _ _____              |\n|   / ___|___  _ __ ___   ___  |_   _|__    / ___| |_   _  ___ / ___|___  _ __   ( ) |___ /              |\n|  | |   / _ \\| '_ ` _ \\ / _ \\   | |/ _ \\  | |   | | | | |/ _ \\ |   / _ \\| '_ \\  |/| | |_ \\              |\n|  | |__| (_) | | | | | |  __/   | | (_) | | |___| | |_| |  __/ |__| (_) | | | |   | |___) |             |\n|   \\____\\___/|_| |_| |_|\\___|   |_|\\___/   \\____|_|\\__,_|\\___|\\____\\___/|_| |_|   |_|____/              |\n|                                                                                                        |\n|    ____ _     _                          _   _ ____    _                                               |\n|   / ___| |__ (_) ___ __ _  __ _  ___    | | | / ___|  / \\                                              |\n|  | |   | '_ \\| |/ __/ _` |/ _` |/ _ \\   | | | \\___ \\ / _ \\                                             |\n|  | |___| | | | | (_| (_| | (_| | (_) |  | |_| |___) / ___ \\                                            |\n|   \\____|_| |_|_|\\___\\__,_|\\__, |\\___( )  \\___/|____/_/   \\_\\                                           |\n|                           |___/     |/                                                                 |\n|      _                         _      __   _   _                ___  _   _       ____   ___  _ _____   |\n|     / \\  _   _  __ _ _   _ ___| |_   / /_ | |_| |__            ( _ )| |_| |__   |___ \\ / _ \\/ |___ /   |\n|    / _ \\| | | |/ _` | | | / __| __| | '_ \\| __| '_ \\   _____   / _ \\| __| '_ \\    __) | | | | | |_ \\   |\n|   / ___ \\ |_| | (_| | |_| \\__ \\ |_  | (_) | |_| | | | |_____| | (_) | |_| | | |  / __/| |_| | |___) |  |\n|  /_/   \\_\\__,_|\\__, |\\__,_|___/\\__|  \\___/ \\__|_| |_|          \\___/ \\__|_| |_| |_____|\\___/|_|____/   |\n|                |___/                                                                                   |\n|                                           _                                                            |\n|  __      ____      ____      __       ___| |_   _  ___  ___ ___  _ __         ___ ___  _ __ ___        |\n|  \\ \\ /\\ / /\\ \\ /\\ / /\\ \\ /\\ / /      / __| | | | |/ _ \\/ __/ _ \\| '_ \\       / __/ _ \\| '_ ` _ \\       |\n|   \\ V  V /  \\ V  V /  \\ V  V /   _  | (__| | |_| |  __/ (_| (_) | | | |  _  | (_| (_) | | | | | |      |\n|    \\_/\\_/    \\_/\\_/    \\_/\\_/   (_)  \\___|_|\\__,_|\\___|\\___\\___/|_| |_| (_)  \\___\\___/|_| |_| |_|      |\n|                                                                                                        |\n.========================================================================================================.\n";
 
index cacf12f376f3959a085894a55a861d2b848fbcfb..44666193c615e0a9f6ae398e4c690b20b6feeac0 100644 (file)
@@ -1,3 +1,2 @@
-
-const char *cc = "\e[01;44;33m\n.========================================================================================================.\n|    ____                       _____        ____ _             ____              _ _ _____              |\n|   / ___|___  _ __ ___   ___  |_   _|__    / ___| |_   _  ___ / ___|___  _ __   ( ) |___ /              |\n|  | |   / _ \\| '_ ` _ \\ / _ \\   | |/ _ \\  | |   | | | | |/ _ \\ |   / _ \\| '_ \\  |/| | |_ \\              |\n|  | |__| (_) | | | | | |  __/   | | (_) | | |___| | |_| |  __/ |__| (_) | | | |   | |___) |             |\n|   \\____\\___/|_| |_| |_|\\___|   |_|\\___/   \\____|_|\\__,_|\\___|\\____\\___/|_| |_|   |_|____/              |\n|                                                                                                        |\n|    ____ _     _                          _   _ ____    _                                               |\n|   / ___| |__ (_) ___ __ _  __ _  ___    | | | / ___|  / \\                                              |\n|  | |   | '_ \\| |/ __/ _` |/ _` |/ _ \\   | | | \\___ \\ / _ \\                                             |\n|  | |___| | | | | (_| (_| | (_| | (_) |  | |_| |___) / ___ \\                                            |\n|   \\____|_| |_|_|\\___\\__,_|\\__, |\\___( )  \\___/|____/_/   \\_\\                                           |\n|                           |___/     |/                                                                 |\n|      _                         _      __   _   _                ___  _   _       ____   ___  _ _____   |\n|     / \\  _   _  __ _ _   _ ___| |_   / /_ | |_| |__            ( _ )| |_| |__   |___ \\ / _ \\/ |___ /   |\n|    / _ \\| | | |/ _` | | | / __| __| | '_ \\| __| '_ \\   _____   / _ \\| __| '_ \\    __) | | | | | |_ \\   |\n|   / ___ \\ |_| | (_| | |_| \\__ \\ |_  | (_) | |_| | | | |_____| | (_) | |_| | | |  / __/| |_| | |___) |  |\n|  /_/   \\_\\__,_|\\__, |\\__,_|___/\\__|  \\___/ \\__|_| |_|          \\___/ \\__|_| |_| |_____|\\___/|_|____/   |\n|                |___/                                                                                   |\n|                                           _                                                            |\n|  __      ____      ____      __       ___| |_   _  ___  ___ ___  _ __         ___ ___  _ __ ___        |\n|  \\ \\ /\\ / /\\ \\ /\\ / /\\ \\ /\\ / /      / __| | | | |/ _ \\/ __/ _ \\| '_ \\       / __/ _ \\| '_ ` _ \\       |\n|   \\ V  V /  \\ V  V /  \\ V  V /   _  | (__| | |_| |  __/ (_| (_) | | | |  _  | (_| (_) | | | | | |      |\n|    \\_/\\_/    \\_/\\_/    \\_/\\_/   (_)  \\___|_|\\__,_|\\___|\\___\\___/|_| |_| (_)  \\___\\___/|_| |_| |_|      |\n|                                                                                                        |\n.========================================================================================================.\n\e[0m\n\n";
+const char *cc = ".========================================================================================================.\n|    ____                       _____        ____ _             ____              _ _ _____              |\n|   / ___|___  _ __ ___   ___  |_   _|__    / ___| |_   _  ___ / ___|___  _ __   ( ) |___ /              |\n|  | |   / _ \\| '_ ` _ \\ / _ \\   | |/ _ \\  | |   | | | | |/ _ \\ |   / _ \\| '_ \\  |/| | |_ \\              |\n|  | |__| (_) | | | | | |  __/   | | (_) | | |___| | |_| |  __/ |__| (_) | | | |   | |___) |             |\n|   \\____\\___/|_| |_| |_|\\___|   |_|\\___/   \\____|_|\\__,_|\\___|\\____\\___/|_| |_|   |_|____/              |\n|                                                                                                        |\n|    ____ _     _                          _   _ ____    _                                               |\n|   / ___| |__ (_) ___ __ _  __ _  ___    | | | / ___|  / \\                                              |\n|  | |   | '_ \\| |/ __/ _` |/ _` |/ _ \\   | | | \\___ \\ / _ \\                                             |\n|  | |___| | | | | (_| (_| | (_| | (_) |  | |_| |___) / ___ \\                                            |\n|   \\____|_| |_|_|\\___\\__,_|\\__, |\\___( )  \\___/|____/_/   \\_\\                                           |\n|                           |___/     |/                                                                 |\n|      _                         _      __   _   _                ___  _   _       ____   ___  _ _____   |\n|     / \\  _   _  __ _ _   _ ___| |_   / /_ | |_| |__            ( _ )| |_| |__   |___ \\ / _ \\/ |___ /   |\n|    / _ \\| | | |/ _` | | | / __| __| | '_ \\| __| '_ \\   _____   / _ \\| __| '_ \\    __) | | | | | |_ \\   |\n|   / ___ \\ |_| | (_| | |_| \\__ \\ |_  | (_) | |_| | | | |_____| | (_) | |_| | | |  / __/| |_| | |___) |  |\n|  /_/   \\_\\__,_|\\__, |\\__,_|___/\\__|  \\___/ \\__|_| |_|          \\___/ \\__|_| |_| |_____|\\___/|_|____/   |\n|                |___/                                                                                   |\n|                                           _                                                            |\n|  __      ____      ____      __       ___| |_   _  ___  ___ ___  _ __         ___ ___  _ __ ___        |\n|  \\ \\ /\\ / /\\ \\ /\\ / /\\ \\ /\\ / /      / __| | | | |/ _ \\/ __/ _ \\| '_ \\       / __/ _ \\| '_ ` _ \\       |\n|   \\ V  V /  \\ V  V /  \\ V  V /   _  | (__| | |_| |  __/ (_| (_) | | | |  _  | (_| (_) | | | | | |      |\n|    \\_/\\_/    \\_/\\_/    \\_/\\_/   (_)  \\___|_|\\__,_|\\___|\\___\\___/|_| |_| (_)  \\___\\___/|_| |_| |_|      |\n|                                                                                                        |\n.========================================================================================================.\n";
 
index e5433077b30c5aed9a0fbfdc95c5404d1bd10835..5872a14c95aecab69b5b52cdb309be546ee22607 100644 (file)
@@ -1914,17 +1914,21 @@ SWITCH_DECLARE(const char *) switch_core_banner(void)
 {
 
        return ("\n"
-                       "   _____              ______        _____ _____ ____ _   _  \n"
-                       "  |  ___| __ ___  ___/ ___\\ \\      / /_ _|_   _/ ___| | | | \n"
-                       "  | |_ | '__/ _ \\/ _ \\___ \\\\ \\ /\\ / / | |  | || |   | |_| | \n"
-                       "  |  _|| | |  __/  __/___) |\\ V  V /  | |  | || |___|  _  | \n"
-                       "  |_|  |_|  \\___|\\___|____/  \\_/\\_/  |___| |_| \\____|_| |_| \n"
+                       ".=============================================================.\n"
+                       "|   _____              ______        _____ _____ ____ _   _   |\n"
+                       "|  |  ___| __ ___  ___/ ___\\ \\      / /_ _|_   _/ ___| | | |  |\n"
+                       "|  | |_ | '__/ _ \\/ _ \\___ \\\\ \\ /\\ / / | |  | || |   | |_| |  |\n"
+                       "|  |  _|| | |  __/  __/___) |\\ V  V /  | |  | || |___|  _  |  |\n"
+                       "|  |_|  |_|  \\___|\\___|____/  \\_/\\_/  |___| |_| \\____|_| |_|  |\n"
+                       "|                                                             |\n"
+                       ".=============================================================."
                        "\n"
-                       "************************************************************\n"
-                       "* Anthony Minessale II, Michael Jerris, Brian West, Others *\n"
-                       "* FreeSWITCH (http://www.freeswitch.org)                   *\n"
-                       "* Paypal Donations Appreciated: paypal@freeswitch.org      *\n"
-                       "* Brought to you by ClueCon http://www.cluecon.com/        *\n" "************************************************************\n" 
+
+                       "|   Anthony Minessale II, Michael Jerris, Brian West, Others  |\n"
+                       "|   FreeSWITCH (http://www.freeswitch.org)                    |\n"
+                       "|   Paypal Donations Appreciated: paypal@freeswitch.org       |\n"
+                       "|   Brought to you by ClueCon http://www.cluecon.com/         |\n" 
+                       ".=============================================================.\n" 
                        "\n");
 }
 
@@ -1969,7 +1973,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(switch_core_flag_t
                switch_event_fire(&event);
        }
 
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "%s%s", switch_core_banner(), cc);
+       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "%s%s%s%s%s%s\n\n", 
+                                         SWITCH_SEQ_DEFAULT_COLOR,
+                                         SWITCH_SEQ_FYELLOW, SWITCH_SEQ_BBLUE,
+                                         switch_core_banner(), 
+                                         cc, SWITCH_SEQ_DEFAULT_COLOR);
 
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE,