#include int main() { WINDOW *stdscr,*w1,*w2; char str1[] = "Zwei",*Pstr; int z; Pstr=str1; stdscr = initscr(); int sc=start_color(); nonl(); intrflush(stdscr, FALSE); keypad(stdscr, TRUE); // Zwei Fenster w1=newwin(10,10,0,0); w2=newwin(10,10,0,20); // Scrollen erlauben scrollok(w1,1); scrollok(w2,1); // Color-Pairs anlegen (Farbkombinationen) int cp=init_pair(1,COLOR_MAGENTA,COLOR_BLUE); cp=init_pair(2,COLOR_BLUE,COLOR_MAGENTA); COLOR_PAIR(1); for (z=0;z < 500;z++) { str1[1]='A'+(z%19); // Color-Pair1 für window w1 benutzen wattrset(w1,COLOR_PAIR(1)); if (z > 9) wscrl(w1,1); wmove(w1,z < 9?(z%9):9,0); waddstr(w1,Pstr); wrefresh(w1); wattrset(w2,COLOR_PAIR(2)); if (z > 9) wscrl(w2,-1); wmove(w2,z<9?(z%9):0,0); waddstr(w2,Pstr); wrefresh(w2); usleep(100); usleep(100); usleep(100); usleep(100); usleep(100); } sleep(1); delwin(w1); delwin(w2); endwin(); return 0; }