notcurses-demo: improve usage() for 25 demos #736

This commit is contained in:
nick black 2020-10-28 04:57:53 -04:00 committed by Nick Black
parent e3a617f20d
commit 4203c2402f
2 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@ rearrangements of Notcurses.
* Blitting functions no longer count transparent cells towards the total
returned number of cells written, but since these are not directly
callable by the user, this ought not lead to any user-visible changes.
* Added (k)eller demo to `notcurses-demo`.
* 2.0.2 (2020-10-25)
* Add `ncvisual_decode_loop()`, which returns to the first frame upon

View File

@ -169,7 +169,7 @@ usage(const char* exe, int status){
int printed = 0;
for(size_t i = 0 ; i < sizeof(demos) / sizeof(*demos) ; ++i){
if(demos[i].name){
if(printed % 6 == 0){
if(printed % 5 == 0){
fprintf(out, " ");
}
// U+24D0: CIRCLED LATIN SMALL LETTER A
@ -177,12 +177,12 @@ usage(const char* exe, int status){
fprintf(out, "%lc ", *demos[i].name - 'a' + 0x24d0);
if(n) ncdirect_fg_rgb8(n, 0xff, 0xff, 0xff);
fprintf(out, "%-*.*s", 8, 8, demos[i].name + 1);
if(++printed % 6 == 0){
if(++printed % 5 == 0){
fprintf(out, "\n");
}
}
}
if(printed % 6){
if(printed % 5){
fprintf(out, "\n");
}
ncdirect_stop(n);