mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
[tabbed PoC] kill dead stores #1348
This commit is contained in:
parent
b544364ab4
commit
5010911a08
@ -83,12 +83,14 @@ int main(int argc, char** argv){
|
|||||||
struct nctab* t_; // stupid unused result warnings
|
struct nctab* t_; // stupid unused result warnings
|
||||||
(void) t_;
|
(void) t_;
|
||||||
ncplane_set_base(nctabbed_content_plane(nct), " ", 0, NCCHANNELS_INITIALIZER(255, 255, 255, 15, 60, 15));
|
ncplane_set_base(nctabbed_content_plane(nct), " ", 0, NCCHANNELS_INITIALIZER(255, 255, 255, 15, 60, 15));
|
||||||
t_ = nctabbed_add(nct, NULL, NULL, tabcbfn, "Tab #1", NULL);
|
if(nctabbed_add(nct, NULL, NULL, tabcbfn, "Tab #1", NULL) == NULL
|
||||||
t_ = nctabbed_add(nct, NULL, NULL, tabcbfn, "gamma", NULL);
|
|| nctabbed_add(nct, NULL, NULL, tabcbfn, "gamma", NULL) == NULL
|
||||||
t_ = nctabbed_add(nct, NULL, NULL, tabcbfn, "beta", NULL);
|
|| nctabbed_add(nct, NULL, NULL, tabcbfn, "beta", NULL) == NULL
|
||||||
t_ = nctabbed_add(nct, NULL, NULL, tabcbfn, "alpha", NULL);
|
|| nctabbed_add(nct, NULL, NULL, tabcbfn, "alpha", NULL) == NULL
|
||||||
t_ = nctabbed_add(nct, NULL, NULL, tabcbfn, "Tab #3", NULL);
|
|| nctabbed_add(nct, NULL, NULL, tabcbfn, "Tab #3", NULL) == NULL
|
||||||
t_ = nctabbed_add(nct, NULL, NULL, tabcbfn, "Tab #2", NULL);
|
|| nctabbed_add(nct, NULL, NULL, tabcbfn, "Tab #2", NULL) == NULL){
|
||||||
|
goto ded;
|
||||||
|
}
|
||||||
ncplane_puttext(stdp, 1, NCALIGN_CENTER,
|
ncplane_puttext(stdp, 1, NCALIGN_CENTER,
|
||||||
"Use left/right arrow keys for navigation, "
|
"Use left/right arrow keys for navigation, "
|
||||||
"'[' and ']' to rotate tabs, "
|
"'[' and ']' to rotate tabs, "
|
||||||
@ -127,7 +129,9 @@ int main(int argc, char** argv){
|
|||||||
nctab_move_right(nct, nctabbed_selected(nct));
|
nctab_move_right(nct, nctabbed_selected(nct));
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
t_ = nctabbed_add(nct, NULL, NULL, tabcbfn, tabnames[tabnameind++], NULL);
|
if(nctabbed_add(nct, NULL, NULL, tabcbfn, tabnames[tabnameind++], NULL) == NULL){
|
||||||
|
goto ded;
|
||||||
|
}
|
||||||
tabnameind %= sizeof(tabnames) / sizeof(tabnames[0]);
|
tabnameind %= sizeof(tabnames) / sizeof(tabnames[0]);
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
|
Loading…
Reference in New Issue
Block a user