home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / SCCURSOR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  1.6 KB  |  53 lines

  1. /**
  2. *
  3. * Name        sccursor -- Set the cursor size for the active page.
  4. *
  5. * Synopsis    scur = sccursor(off,high,low);
  6. *
  7. *        int scur      Value of "off" parameter
  8. *        int off       Cursor off indicator (0 = on)
  9. *        int high      The cursor upper scan line
  10. *        int low       The cursor lower scan line
  11. *
  12. * Description    This function sets and records the size of the cursor
  13. *        for the active (displayed) page.  The cursor size is
  14. *        determined by the upper and lower scan lines, whose
  15. *        values can be between 0 and 13 for the Monochrome
  16. *        Adapter, and 0 and 7 for the Color/Graphics Adapter.  If
  17. *        off is nonzero, the cursor is turned off (no display);
  18. *        otherwise it is on.
  19. *
  20. *        Use SCPGCUR to set the cursor size and on/off state for
  21. *        the current display page regardless of whether it is
  22. *        active (displayed).  Use SCCURST to return the size and
  23. *        on/off state of the current page's cursor.
  24. *
  25. * Returns    scur          Value of "off" parameter (0 = on)
  26. *
  27. * Version    3.0  (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
  28. *
  29. **/
  30.  
  31. #include <bscreen.h>
  32.  
  33. int sccursor(off,high,low)
  34. int off;
  35. int high;
  36. int low;
  37. {
  38.     int mode,columns,act_page,old_page;
  39.  
  40.     old_page = b_curpage;          /* Save current page number.    */
  41.     scmode(&mode,&columns,&act_page); /* Get active page.          */
  42.     scpage(act_page);              /* Designate active page as     */
  43.                       /* current.              */
  44.  
  45.     scpgcur(off,high,low,CUR_ADJUST); /* Set cursor for current page  */
  46.                       /* (which now coincides with    */
  47.                       /* active page).              */
  48.  
  49.     scpage(old_page);              /* Restore previous current page*/
  50.  
  51.     return(off);
  52. }
  53.