42_helloncurses.c 246 B

123456789101112131415
  1. #include <ncurses.h>
  2. int main()
  3. {
  4. initscr();
  5. printw("Hello, ncurses!\n");
  6. refresh();
  7. int ch;
  8. while ((ch = getch()) == KEY_RESIZE)
  9. {
  10. // KEY_RESIZE event usually appears when keyboard shows in Terminal on Android
  11. }
  12. endwin();
  13. return 0;
  14. }