1
0

hello1.c 497 B

1234567891011121314151617181920212223
  1. /* hello1.c
  2. * purpose show the minimal calls needed to use curses
  3. * outline initialize, draw stuff, wait for input, quit
  4. */
  5. #include <stdio.h>
  6. #include <curses.h>
  7. main()
  8. {
  9. initscr() ; /* turn on curses */
  10. /* send requests */
  11. clear(); /* clear screen */
  12. move(10,20); /* row10,col20 */
  13. addstr("Hello, world"); /* add a string */
  14. move(LINES-1,0); /* move to LL */
  15. refresh(); /* update the screen */
  16. getch(); /* wait for user input */
  17. endwin(); /* turn off curses */
  18. }