dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 1d5c9f30986a8fb46bc47b6c09f11e130702edfe
parent fc397495fe907e2752ada48b0107beb5f85cc2be
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Mon, 18 Apr 2011 18:56:02 +0200

madtty: merge different init function into one common one

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
dvtm.c | 3+--
madtty.c | 10++++++++--
madtty.h | 3+--
3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -866,8 +866,7 @@ setup() { mouse_setup(); #endif raw(); - madtty_init_colors(); - madtty_init_vt100_graphics(); + madtty_init(); getmaxyx(stdscr, height, width); resize_screen(); signal(SIGWINCH, sigwinch_handler); diff --git a/madtty.c b/madtty.c @@ -947,7 +947,7 @@ static uint16_t const vt100_utf8[62] = { static uint32_t vt100[62]; -void madtty_init_vt100_graphics(void) +static void init_vt100_graphics(void) { vt100['l' - 0x41] = ACS_ULCORNER; vt100['m' - 0x41] = ACS_LLCORNER; @@ -1538,7 +1538,7 @@ void madtty_color_set(WINDOW *win, short fg, short bg) } } -void madtty_init_colors(void) +static void init_colors(void) { has_default_colors = (use_default_colors() == OK); @@ -1569,6 +1569,12 @@ void madtty_init_colors(void) } } +void madtty_init(void) +{ + init_colors(); + init_vt100_graphics(); +} + void madtty_set_handler(madtty_t *t, madtty_handler_t handler) { t->handler = handler; diff --git a/madtty.h b/madtty.h @@ -53,8 +53,7 @@ enum { typedef struct madtty_t madtty_t; typedef int (*madtty_handler_t)(madtty_t *, char *es); -void madtty_init_colors(void); -void madtty_init_vt100_graphics(void); +void madtty_init(void); void madtty_set_handler(madtty_t *, madtty_handler_t); void madtty_set_data(madtty_t *, void *); void *madtty_get_data(madtty_t *);