X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcolors.c;h=1cf4c973cfc63c933b221b4384041764eb51beac;hb=92cb9c45ac41c2e1f7a9517a66e239ee2cb8ccc4;hp=0e78cadc83f37fc25eadc734d91dcfc882cf0492;hpb=bf38fb2de7faf3bc8012fffce9097284b4eed0f3;p=ncmpc.git diff --git a/src/colors.c b/src/colors.c index 0e78cad..1cf4c97 100644 --- a/src/colors.c +++ b/src/colors.c @@ -1,5 +1,5 @@ /* ncmpc (Ncurses MPD Client) - * (c) 2004-2010 The Music Player Daemon Project + * (c) 2004-2017 The Music Player Daemon Project * Project homepage: http://musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -80,7 +80,7 @@ colors_lookup_by_name(const char *name) return NULL; } -static int +static void colors_update_pair(enum color id) { assert(id > 0 && id < COLOR_END); @@ -93,7 +93,6 @@ colors_update_pair(enum color id) init_pair(id, (fg < 0 ? -1 : fg), (bg < 0 ? -1 : bg)); - return 0; } int @@ -152,7 +151,8 @@ colors_str2color(const char *str) if (cur != endptr && endptr[0] == '\0') { color |= tmp; } else { - fprintf(stderr,_("Warning: Unknown color - %s\n"), str); + fprintf(stderr, "%s: %s\n", + _("Unknown color"), str); return COLOR_ERROR; } } @@ -191,7 +191,8 @@ colors_assign(const char *name, const char *value) color_entry_t *entry = colors_lookup_by_name(name); if (!entry) { - fprintf(stderr,_("Warning: Unknown color field - %s\n"), name); + fprintf(stderr, "%s: %s", + _("Unknown color field"), name); return -1; } @@ -203,8 +204,7 @@ colors_assign(const char *name, const char *value) return 0; } - -int +void colors_start(void) { if (has_colors()) { @@ -250,12 +250,10 @@ colors_start(void) g_list_free(color_definition_list); color_definition_list = NULL; } - - return 0; } #endif -int +void colors_use(WINDOW *w, enum color id) { color_entry_t *entry = &colors[id]; @@ -279,6 +277,4 @@ colors_use(WINDOW *w, enum color id) #ifdef ENABLE_COLORS } #endif - - return 0; }