blocks poc: handle std coredump-free #645

dankamongmen/slickgoose
nick black 4 years ago
parent a3369d77a9
commit 1ffd871784
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -15,7 +15,8 @@ allglyphs(struct notcurses* nc, struct ncplane* column, int legendy){
// some of these cause major problems with Kitty, if not others, due to // some of these cause major problems with Kitty, if not others, due to
// heavy duty beating on freetype FIXME reenable when reasonable // heavy duty beating on freetype FIXME reenable when reasonable
const int valid_planes[] = { const int valid_planes[] = {
0, 1, /*2,*/ 3, 14, /*15, 16,*/ -1 0, 1, 2, 3, 14,
/*15, 16,*/ -1
}; };
struct ncplane* std = notcurses_stdplane(nc); struct ncplane* std = notcurses_stdplane(nc);
const int dimx = ncplane_dim_x(column); const int dimx = ncplane_dim_x(column);

@ -13,6 +13,7 @@ auto main() -> int {
notcurses_options nopts{}; notcurses_options nopts{};
nopts.flags = NCOPTION_INHIBIT_SETLOCALE | NCOPTION_NO_ALTERNATE_SCREEN; nopts.flags = NCOPTION_INHIBIT_SETLOCALE | NCOPTION_NO_ALTERNATE_SCREEN;
NotCurses nc(nopts); NotCurses nc(nopts);
{
std::unique_ptr<Plane> n (nc.get_stdplane()); std::unique_ptr<Plane> n (nc.get_stdplane());
int dimx, dimy; int dimx, dimy;
nc.get_term_dim(&dimy, &dimx); nc.get_term_dim(&dimy, &dimx);
@ -43,8 +44,9 @@ auto main() -> int {
if(!nc.render()){ if(!nc.render()){
goto err; goto err;
} }
}
sleep(1); sleep(1);
return nc.stop() ? EXIT_FAILURE : EXIT_SUCCESS; return nc.stop() ? EXIT_SUCCESS : EXIT_FAILURE;
err: err:
return EXIT_FAILURE; return EXIT_FAILURE;

Loading…
Cancel
Save