home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 332_01 / mvcursor.c < prev    next >
C/C++ Source or Header  |  1990-01-06  |  2KB  |  42 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 (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:     Changed call sequqnce to cursesio.[c,asm], Thanks    */
  15. /*     to S. Creps. Rcsid[] string for maintenance:    881002    */
  16. /* 1.0:     Release:                    870515    */
  17. /****************************************************************/
  18.  
  19. #include <curses.h>
  20. #include <curspriv.h>
  21.  
  22. char _curses_mvcursor_rcsid[] = "@(#)mvcursor.c   v.1.4  - 900114";
  23.  
  24. /****************************************************************/
  25. /* Mvcur(oldy,oldx,newy,newx) the display cursor to <newy,newx>    */
  26. /* [ NOTE: Compiler may warn that oldx and oldy are not used ]    *.
  27. /****************************************************************/
  28.  
  29. int    mvcur(oldy,oldx,newy,newx)
  30.   int oldy;
  31.   int oldx;
  32.   int newy;
  33.   int newx;
  34.   {
  35.   if ((newy >= LINES) || (newx >= COLS) || (newy < 0) || (newx < 0))
  36.     return(ERR);
  37.   _cursescursor(newy,newx);
  38.   _cursvar.cursrow = newy;
  39.   _cursvar.curscol = newx;
  40.   return(OK);
  41.   } /* mvcur */
  42.