1 # ncurses output for DCT, by Shiar
3 # 1.11.0 200410152225 - uses class in filename instead of $set{display} check
4 # 1.10.0 200410140120 - all output functions seperated from main
11 push @{$hook{init}}, sub {
13 END { endwin; } # restore terminal on quit
15 $set{height} = $LINES-2 if $LINES>=3;
16 $set{width} = $COLS if $COLS;
19 push @{$hook{showerror}}, sub {
26 ReadKey; # wait for confirm
27 1 while defined ReadKey(-1); # clear key buffer
30 push @{$hook{showstack}}, sub {
32 addstr($set{height}-$_, 1, "$_: ".showval($stack[$_], $set{base}));
35 clrtoeol($set{height}-@stack, 1);
38 push @{$hook{refresh}}, sub {
40 addstr($set{height}+1, 0, "> "); # prompt
43 push @{$hook{showentry}}, sub {
44 addstr($set{height}+1, 2, $_[0]);
51 title => "curses output",