home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CURS13_2.ZIP / WINMOVE.C < prev    next >
Text File  |  1989-12-08  |  1KB  |  37 lines

  1. /****************************************************************/
  2. /* Mvwin() 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:    Max limits off by 1. Fixed thanks to S. Creps:    881002    */
  13. /* 1.3:    MSC -W3, Turbo'C' -w -w-pro checkes:        881005    */
  14. /****************************************************************/
  15.  
  16. #include <curses.h>
  17. #include <curspriv.h>
  18.  
  19. char _curses_winmove_rcsid[] = "@(#)winmove.c v1.3 - 881005";
  20.  
  21. /****************************************************************/
  22. /* Mvwin() moves window 'win' to position (begx, begy) on the    */
  23. /* screen.                            */
  24. /****************************************************************/
  25.  
  26. int    mvwin(win, begy, begx)
  27.   WINDOW    *win;
  28.   int         begy, begx;
  29.   {
  30.   if ((begy + win->_maxy) >= (LINES-1) || (begx + win->_maxx) > (COLS-1))
  31.     return(ERR);
  32.   win->_begy = begy;
  33.   win->_begx = begx;
  34.   touchwin(win);
  35.   return(OK);
  36.   } /* mvwin */
  37.