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

pull/1085/head
nick black 4 years ago committed by Nick Black
parent e3a617f20d
commit 4203c2402f

@ -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

@ -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);

Loading…
Cancel
Save