home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / CURSES.LZH / MVCURSOR.C < prev    next >
C/C++ Source or Header  |  1980-01-01  |  1KB  |  39 lines

  1. /****************************************************************/
  2. /* Mvcur() 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_mvcursor_rcsid[] = "@(#)mvcursor.c v1.3 - 881005";
  21.  
  22. /****************************************************************/
  23. /* Mvcur(oldy,oldx,newy,newx) the display cursor to <newy,newx>    */
  24. /****************************************************************/
  25.  
  26. int    mvcur(oldy,oldx,newy,newx)
  27.   int oldy;
  28.   int oldx;
  29.   int newy;
  30.   int newx;
  31.   {
  32.   if ((newy >= LINES) || (newx >= COLS) || (newy < 0) || (newx < 0))
  33.     return(ERR);
  34.   _cursescursor(newy,newx);
  35.   _cursvar.cursrow = newy;
  36.   _cursvar.curscol = newx;
  37.   return(OK);
  38.   } /* mvcur */
  39.