whiteout, uniblocks: explicitly skip if not UTF8

This commit is contained in:
nick black 2020-05-11 06:07:01 -04:00
parent 0bab14f654
commit 37454602f6
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 9 additions and 0 deletions

View File

@ -172,6 +172,11 @@ int unicodeblocks_demo(struct notcurses* nc){
{ .name = "Supplemental Arrows-C, Supplemental Symbols", .start = 0x1f800, }, { .name = "Supplemental Arrows-C, Supplemental Symbols", .start = 0x1f800, },
{ .name = "Chess Symbols, Symbols and Pictographs Extended-A", .start = 0x1fa00, }, { .name = "Chess Symbols, Symbols and Pictographs Extended-A", .start = 0x1fa00, },
}; };
// this demo is completely meaningless outside UTF-8 mode
if(!notcurses_canutf8(nc)){
return 0;
}
ncplane_greyscale(notcurses_stdplane(nc)); ncplane_greyscale(notcurses_stdplane(nc));
size_t sindex; size_t sindex;
// we don't want a full delay period for each one, urk...or do we? // we don't want a full delay period for each one, urk...or do we?

View File

@ -449,6 +449,10 @@ int witherworm_demo(struct notcurses* nc){
const int steps[] = { 0, 0x10040, 0x20110, 0x120, 0x12020, }; const int steps[] = { 0, 0x10040, 0x20110, 0x120, 0x12020, };
const int starts[] = { 0, 0x10101, 0x004000, 0x000040, 0x400040, }; const int starts[] = { 0, 0x10101, 0x004000, 0x000040, 0x400040, };
// this demo is completely meaningless outside UTF-8 mode
if(!notcurses_canutf8(nc)){
return 0;
}
size_t i; size_t i;
const size_t screens = sizeof(steps) / sizeof(*steps); const size_t screens = sizeof(steps) / sizeof(*steps);
struct ncplane* n = notcurses_stdplane(nc); struct ncplane* n = notcurses_stdplane(nc);