home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 332_02 / wintouch.c < prev    next >
C/C++ Source or Header  |  1990-01-06  |  2KB  |  44 lines

  1. /****************************************************************/
  2. /* Touchwin() 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 (bl@infovox.se)    */
  10. /****************************************************************/
  11. /* 1.4:  Use of short wherever possible. Portability        */
  12. /*     improvements:                    900114    */
  13. /* 1.3:     MSC -W3, Turbo'C' -w -w-pro checkes:        881005    */
  14. /* 1.2:     Max limits off by 1. Fixed thanks to S. Creps:    881002    */
  15. /* 1.0:     Release:                    870515    */
  16. /****************************************************************/
  17.  
  18. #include <curses.h>
  19. #include <curspriv.h>
  20.  
  21. char _curses_wintouch_rcsid[] = "@(#)wintouch.c   v.1.4  - 900114";
  22.  
  23. /****************************************************************/
  24. /* Touchwin() marks all lines of window 'win' as changed, from    */
  25. /* the first to the last character on the line.            */
  26. /****************************************************************/
  27.  
  28. void touchwin(win)
  29.   WINDOW    *win;
  30.   {
  31.   short    y;
  32.   short maxy;
  33.   short maxx;
  34.  
  35.   maxy = win->_maxy - 1;
  36.   maxx = win->_maxx - 1;
  37.  
  38.   for (y = 0; y <= maxy; y++)
  39.     {
  40.     win->_minchng[y] = 0;
  41.     win->_maxchng[y] = maxx;
  42.     } /* for */
  43.   } /* touchwin */
  44.