home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / cprog / cursesp.zip / ENDWIN.C < prev    next >
C/C++ Source or Header  |  1991-12-02  |  2KB  |  38 lines

  1. /****************************************************************/
  2. /* Endwin() routine of the PCcurses package                     */
  3. /*                                                              */
  4. /****************************************************************/
  5. /* This version of curses is based on ncurses, a curses version */
  6. /* originally written by Pavel Curtis at Cornell University.    */
  7. /* I have made substantial changes to make it run on IBM PC's,  */
  8. /* and therefore consider myself free to make it public domain. */
  9. /*              Bjorn Larsson (...mcvax!enea!infovax!bl)        */
  10. /****************************************************************/
  11. /* 1.0: Release:                                        870515  */
  12. /* 1.2: Changed call sequence to cursesio.[c,asm], Thanks       */
  13. /*      to S. Creps. Rcsid[] string for maintenance:    881002  */
  14. /* 1.3: MSC -W3, Turbo'C' -w -w-pro checkes:            881005  */
  15. /****************************************************************/
  16.  
  17. #include <curses.h>
  18. #include <curspriv.h>
  19.  
  20. char _curses_endwin_rcsid[] = "@(#)endwin.c v1.3 - 881005";
  21.  
  22. /****************************************************************/
  23. /* Endwin() does necessary clean-up after using the PCcurses    */
  24. /* package. It should be called before exiting the user's pro-  */
  25. /* gram.                                                        */
  26. /****************************************************************/
  27.  
  28. int endwin()
  29.   {
  30.   delwin(stdscr);
  31.   delwin(curscr);
  32.   delwin(_cursvar.tmpwin);
  33.   curson();                             /* turn on cursor if off */
  34.   _cursescursor(_LINES-1, 0);           /* put at lower left */
  35.   _cursesscb(_cursvar.orgcbr);          /* restore original ^BREAK setting */
  36.   return(OK);
  37.   } /* endwin */
  38.