X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=gui.c;h=f08976d2575d96afca710fb5d0b7b4bdd9246ab4;hb=7fbd028fc23846f9f410e3876f5ed92d2d9d5d28;hp=9a02bdcabc3c252fb875b893cea5610f23243b2e;hpb=806fcbb5a8c00d6b8c1a228b9b4d6b6758f613ca;p=paraslash.git diff --git a/gui.c b/gui.c index 9a02bdca..f08976d2 100644 --- a/gui.c +++ b/gui.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1998-2008 Andre Noll + * Copyright (C) 1998-2009 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -489,7 +489,7 @@ static int add_output_line(char *line, __a_unused void *data) return 1; } -void para_log(int ll, const char *fmt,...) +__printf_2_3 void para_log(int ll, const char *fmt,...) { int color; char *msg; @@ -497,9 +497,9 @@ void para_log(int ll, const char *fmt,...) if (ll < conf.loglevel_arg || !curses_active) return; switch (ll) { - case DEBUG: - case INFO: - case NOTICE: + case LL_DEBUG: + case LL_INFO: + case LL_NOTICE: color = COLOR_MSG; break; default: @@ -523,7 +523,7 @@ static void setup_signal_handling(void) signal(SIGHUP, SIG_IGN); } -static void do_exit(int ret) +__noreturn static void do_exit(int ret) { signal(SIGTERM, SIG_IGN); kill(0, SIGTERM); @@ -539,7 +539,7 @@ static void shutdown_curses(void) endwin(); } -static void finish(int ret) +__noreturn static void finish(int ret) { shutdown_curses(); do_exit(ret); @@ -548,7 +548,7 @@ static void finish(int ret) /* * exit curses and print given message to stdout/stderr */ -__printf_2_3 static void msg_n_exit(int ret, const char* fmt, ...) +__noreturn __printf_2_3 static void msg_n_exit(int ret, const char* fmt, ...) { va_list argp; FILE *outfd = ret? stderr: stdout; @@ -563,7 +563,7 @@ __printf_2_3 static void msg_n_exit(int ret, const char* fmt, ...) static void print_welcome(void) { int ll = conf.loglevel_arg; - if (ll > NOTICE) + if (ll > LL_NOTICE) return; outputf(COLOR_WELCOME, "Welcome to para_gui " PACKAGE_VERSION " \"" CODENAME "\". Theme: %s", theme.name); @@ -1168,7 +1168,7 @@ err_out: static void com_ll_decr(void) { - if (conf.loglevel_arg <= DEBUG) { + if (conf.loglevel_arg <= LL_DEBUG) { print_in_bar(COLOR_ERRMSG, "loglevel already at maximal verbosity\n"); return; @@ -1179,7 +1179,7 @@ static void com_ll_decr(void) static void com_ll_incr(void) { - if (conf.loglevel_arg >= EMERG) { + if (conf.loglevel_arg >= LL_EMERG) { print_in_bar(COLOR_ERRMSG, "loglevel already at miminal verbosity\n"); return; @@ -1280,7 +1280,7 @@ static void com_version(void) CODENAME "\""); } -static void com_quit(void) +__noreturn static void com_quit(void) { finish(0); }