From 92cb9c45ac41c2e1f7a9517a66e239ee2cb8ccc4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Mar 2017 21:42:52 +0100 Subject: [PATCH] colors: colors_update_pair(), colors_start() and colors_use() return void --- src/colors.c | 12 +++--------- src/colors.h | 7 +++++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/colors.c b/src/colors.c index 2c1a2d0..1cf4c97 100644 --- a/src/colors.c +++ b/src/colors.c @@ -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 @@ -205,8 +204,7 @@ colors_assign(const char *name, const char *value) return 0; } - -int +void colors_start(void) { if (has_colors()) { @@ -252,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]; @@ -281,6 +277,4 @@ colors_use(WINDOW *w, enum color id) #ifdef ENABLE_COLORS } #endif - - return 0; } diff --git a/src/colors.h b/src/colors.h index 1ccf50d..c166c36 100644 --- a/src/colors.h +++ b/src/colors.h @@ -49,9 +49,12 @@ int colors_str2color(const char *str); #ifdef ENABLE_COLORS int colors_assign(const char *name, const char *value); int colors_define(const char *name, short r, short g, short b); -int colors_start(void); + +void +colors_start(void); #endif -int colors_use(WINDOW *w, enum color id); +void +colors_use(WINDOW *w, enum color id); #endif /* COLORS_H */ -- 2.30.2