From: anon Date: Mon, 28 Aug 2023 13:54:01 +0000 (+0200) Subject: Merge branch 'master' of https://git.lain.church/emil/hl X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=ab00a0d8942856bb419d2484f38056a02b3ca85c;p=public-libhl.git Merge branch 'master' of https://git.lain.church/emil/hl --- ab00a0d8942856bb419d2484f38056a02b3ca85c diff --cc source/terminal_hl.h index c71cdaa,6b2f597..5fe1947 --- a/source/terminal_hl.h +++ b/source/terminal_hl.h @@@ -29,24 -38,7 +42,20 @@@ void cterm_render_callback(const char fputs(TERMINAL_RESET, stdout); } - display_t * cterm = &(display_t) { - .key = "cterm", - .callback = cterm_render_callback - }; + +void fun(const char * const attribute, + const char * const color, + hl_group_t * * group){ + terminal_hl_t * t = (terminal_hl_t *)malloc(sizeof(terminal_hl_t)); + t->attribute = attribute; + t->foreground_color = color;; + t->background_color = NULL; + (*group) = (hl_group_t *)malloc(sizeof(hl_group_t)); + (*group)->link = NULL; + (*group)->attributes = (void*)t; +} + - int terminal_hl_init(void){ + int terminal_hl_init(void) { hl_init(); new_display_mode(cterm); //