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

  1. /**
  2. *
  3. * Name        scclear -- Clear the screen
  4. *
  5. * Synopsis    iret = scclear();
  6. *
  7. *        int iret      Returned value is always 0.
  8. *
  9. * Description    This function clears the active (i.e., currently
  10. *        displayed) page by making a call to SCSCROLL.
  11. *
  12. * Returns    iret          Returned value is always 0.
  13. *
  14. * Version    3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
  15. *
  16. **/
  17.  
  18. #include <bscreen.h>
  19.  
  20. int scclear()
  21. {
  22.    int mode,cols,apage,attr;
  23.  
  24.    scmode(&mode,&cols,&apage);
  25.    if ((mode > 3) && (mode != 7))
  26.       attr = 0;                /* Background for graphics mode */
  27.    else
  28.       attr = 7;                /* Normal for text mode           */
  29.  
  30.    return(scscroll(0,attr,0,0,scrows() - 1,cols,SCR_UP));
  31. }
  32.