notcurses: color up warning diagnostics

pull/344/head
nick black 5 years ago
parent 9923b69296
commit 60fe544a33
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -102,7 +102,7 @@ about_toggle(struct notcurses* nc){
ncplane_set_bg(n, 0);
ncplane_set_bg_alpha(n, CELL_ALPHA_BLEND);
ncplane_printf_aligned(n, 1, NCALIGN_CENTER, "notcurses-demo %s", notcurses_version());
ncplane_printf_aligned(n, 3, NCALIGN_LEFT, " Q quit");
ncplane_printf_aligned(n, 3, NCALIGN_LEFT, " q quit");
ncplane_printf_aligned(n, 3, NCALIGN_RIGHT, "restart Ctrl+R ");
ncplane_printf_aligned(n, 4, NCALIGN_LEFT, " H toggle HUD");
ncplane_printf_aligned(n, 4, NCALIGN_RIGHT, "toggle help Ctrl+U ");

@ -942,14 +942,11 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){
putp(tiparm(ret->setaf, 3));
fprintf(ret->ttyfp, " Warning! Built without ffmpeg support\n");
#endif
term_fg_palindex(ret, ret->ttyfp, ret->RGBflag ? 0xe02080 : 3);
term_fg_palindex(ret, ret->ttyfp, ret->colors <= 256 ? 1 % ret->colors : 0xd0a0a0);
if(!ret->RGBflag){ // FIXME
fprintf(ret->ttyfp, "\n Warning! Colors subject to https://github.com/dankamongmen/notcurses/issues/4");
fprintf(ret->ttyfp, "\n Specify a (correct) DirectColor TERM, or COLORTERM.\n");
}else{
/*if((unsigned)ret->colors < (1u << 24u)){
fprintf(ret->ttyfp, "\n Warning! Advertised DirectColor but only %d colors\n", ret->colors);
}*/
if(!ret->CCCflag){
fprintf(ret->ttyfp, "\n Warning! Advertised DirectColor but no 'ccc' flag\n");
}

Loading…
Cancel
Save