diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-07 22:55:11 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-05-07 22:55:11 +0200 |
commit | 7636ebb1490676685217d3191cdf0671a6789032 (patch) | |
tree | 57e8d5292d9c216b74d17a6cb216d8e9614b7a7b | |
parent | 0ee80e4fdc4010ebfb159a0e80c73005eb730a4a (diff) | |
download | xK-7636ebb1490676685217d3191cdf0671a6789032.tar.gz xK-7636ebb1490676685217d3191cdf0671a6789032.tar.xz xK-7636ebb1490676685217d3191cdf0671a6789032.zip |
degesch: add a fancy logo
It's all about the looks, man.
-rw-r--r-- | degesch.c | 27 |
1 files changed, 25 insertions, 2 deletions
@@ -5870,6 +5870,30 @@ init_poller_events (struct app_context *ctx) poller_fd_set (&ctx->tty_event, POLLIN); } +static void +display_logo (void) +{ + const char *logo = + " __ __ \n" + " __/ / ____ ____ ____ ____ ____ / /_ \n" + " / / / , / / / / , / / __/ / __/ / __ \\ \n" + " / / / / __/ / / / / __/ /_ / / /_ / / / / \n" + " /___/ /___/ /_ / /___/ /___/ /___/ /_/ /_/ \n" + " /___/ \n" + " "; + + struct str_vector v; + str_vector_init (&v); + char *x = xstrdup_printf ("%s%s", + logo, PROGRAM_NAME " " PROGRAM_VERSION " starting"); + split_str (x, '\n', &v); + free (x); + + for (size_t i = 0; i < v.len; i++) + print_status ("%s", v.vector[i]); + str_vector_free (&v); +} + int main (int argc, char *argv[]) { @@ -5908,8 +5932,7 @@ main (int argc, char *argv[]) } opt_handler_free (&oh); - - print_status (PROGRAM_NAME " " PROGRAM_VERSION " starting"); + display_logo (); // We only need to convert to and from the terminal encoding setlocale (LC_CTYPE, ""); |