home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c070 / 4.ddi / TOOLS.4 / TCTSRC1.EXE / SCPCLR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-31  |  954 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. * Returns    (None:    function return type is void.)
  11. *
  12. * Version    6.00 (C)Copyright Blaise Computing Inc.  1986-1989
  13. *
  14. **/
  15.  
  16. #include <bscreens.h>
  17.  
  18. void scpclr()
  19. {
  20.     int mode,cols,act_page;
  21.     int save_row,save_col,high,low;
  22.  
  23.     scmode(&mode,&cols,&act_page);
  24.  
  25.                       /* Save cursor location          */
  26.     sccurst(&save_row,&save_col,&high,&low);
  27.  
  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 : NORMAL),
  34.          SC_BLACK,
  35.          (char) ' ',
  36.          cols * scrows());          /* Size of screen           */
  37.  
  38.     sccurset(save_row,save_col);      /* Restore cursor location      */
  39. }
  40.