mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-10 01:29:05 -04:00
notcurses-info: print check/x for styles
This commit is contained in:
parent
9ed9f6bfc0
commit
c0a61357d8
@ -5,14 +5,19 @@
|
||||
#include "internal.h" // internal headers
|
||||
|
||||
static inline wchar_t
|
||||
capbool(const tinfo* ti, bool cap){
|
||||
if(ti->caps.utf8){
|
||||
capboolbool(unsigned utf8, bool cap){
|
||||
if(utf8){
|
||||
return cap ? L'✓' : L'✖';
|
||||
}else{
|
||||
return cap ? '+' : '-';
|
||||
}
|
||||
}
|
||||
|
||||
static inline wchar_t
|
||||
capbool(const tinfo* ti, bool cap){
|
||||
return capboolbool(ti->caps.utf8, cap);
|
||||
}
|
||||
|
||||
static int
|
||||
unicodedumper(const struct notcurses* nc, struct ncplane* n, tinfo* ti, const char* indent){
|
||||
ncplane_printf(n, "%sutf8%lc quad%lc sex%lc braille%lc images%lc videos%lc\n",
|
||||
@ -68,6 +73,8 @@ static void
|
||||
tinfo_debug_style(struct ncplane* n, const char* name, int style){
|
||||
ncplane_set_styles(n, style);
|
||||
ncplane_putstr(n, name);
|
||||
ncplane_putwc(n, capboolbool(notcurses_canutf8(ncplane_notcurses(n)),
|
||||
notcurses_supported_styles(ncplane_notcurses(n)) & style));
|
||||
ncplane_set_styles(n, NCSTYLE_NONE);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user