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

  1. /**
  2. *
  3. * Name        scpclr -- Clear current display page
  4. *
  5. * Synopsis    scpclr();
  6. *
  7. * Description    This function clears the current display page (as
  8. *        recorded in b_curpage) whether it is active or not.
  9. *
  10. *        Use SCCLEAR to clear the active display page.
  11. *
  12. * Returns    (None:    function return type is void.)
  13. *
  14. * Version    3.0  (C)Copyright Blaise Computing Inc. 1986
  15. *
  16. **/
  17.  
  18. #include <bscreen.h>
  19.  
  20. void scpclr()
  21. {
  22.     int mode,cols,act_page;
  23.     int save_row,save_col;
  24.  
  25.     scmode(&mode,&cols,&act_page);
  26.  
  27.     sccurpos(&save_row,&save_col);    /* Save cursor location          */
  28.     sccurset(0,0);
  29.  
  30.                       /* Use foreground attribute     */
  31.                       /*   0 in graphics mode,          */
  32.                       /*   7 in text mode.          */
  33.     scattrib(((mode > 3 && mode != 7) ? 0 : WHITE),
  34.          BLACK,
  35.          (char) ' ',
  36.          cols * scrows());          /* Size of screen           */
  37.  
  38.     sccurset(save_row,save_col);      /* Restore cursor location      */
  39. }
  40.