From 78e0601e4ee68177ef597e75d08da786b0cabd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 9 Sep 2014 21:21:30 +0200 Subject: Rename vis.[ch] to editor.[ch] and main.c to vis.c --- colors.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'colors.c') diff --git a/colors.c b/colors.c index 4a447f6..d1a0357 100644 --- a/colors.c +++ b/colors.c @@ -2,7 +2,7 @@ #include #include -#include "vis.h" +#include "editor.h" #include "util.h" #ifdef NCURSES_VERSION @@ -30,7 +30,7 @@ static unsigned int color_hash(short fg, short bg) return fg * (COLORS + 2) + bg; } -short vis_color_get(short fg, short bg) +short editor_color_get(short fg, short bg) { if (fg >= COLORS) fg = default_fg; @@ -68,10 +68,10 @@ short vis_color_get(short fg, short bg) return color_pair >= 0 ? color_pair : -color_pair; } -short vis_color_reserve(short fg, short bg) +short editor_color_reserve(short fg, short bg) { if (!color2palette) - vis_init(); + editor_init(); if (!color2palette || fg >= COLORS || bg >= COLORS) return 0; if (!has_default_colors && fg == -1) @@ -89,7 +89,7 @@ short vis_color_reserve(short fg, short bg) return color_pair >= 0 ? color_pair : -color_pair; } -void vis_init(void) +void editor_init(void) { if (color2palette) return; @@ -102,5 +102,5 @@ void vis_init(void) color_pairs_max = MIN(COLOR_PAIRS, MAX_COLOR_PAIRS); if (COLORS) color2palette = calloc((COLORS + 2) * (COLORS + 2), sizeof(short)); - vis_color_reserve(COLOR_WHITE, COLOR_BLACK); + editor_color_reserve(COLOR_WHITE, COLOR_BLACK); } -- cgit v1.2.3