hello world 2 ncurses test

This commit is contained in:
ProgramSnail 2021-03-21 17:43:16 +03:00
parent 8de85dcd62
commit ecf87e8c87
3 changed files with 9 additions and 3 deletions

View file

@ -3,11 +3,17 @@
#include <unistd.h>
int main() {
size_t y;
size_t x;
initscr();
noecho();
mvprintw(0, 0, "Hello World!");
refresh();
sleep(1);
curs_set(false);
for (size_t i = 0; ; ++i) {
clear();
getmaxyx(stdscr, y, x);
mvprintw(i % y, i % x, "Hello World!");
refresh();
usleep(30000);
}
endwin();
}