You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

wininit.c 540B

1234567891011121314151617181920212223242526272829303132333435
  1. #include <stddef.h>
  2. #include <curses.h>
  3. /** @file
  4. *
  5. * MuCurses initialisation functions
  6. *
  7. */
  8. /**
  9. * Initialise console environment
  10. *
  11. * @ret *win return pointer to stdscr
  12. */
  13. WINDOW *initscr ( void ) {
  14. /* determine console size */
  15. /* initialise screen */
  16. stdscr->scr->init( stdscr->scr );
  17. stdscr->height = LINES;
  18. stdscr->width = COLS;
  19. erase();
  20. return stdscr;
  21. }
  22. /**
  23. * Finalise console environment
  24. *
  25. */
  26. int endwin ( void ) {
  27. attrset ( 0 );
  28. color_set ( 0, NULL );
  29. erase();
  30. stdscr->scr->exit( stdscr->scr );
  31. return OK;
  32. }