home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / progjour / 1991 / 04 / v_fill_s.c < prev    next >
C/C++ Source or Header  |  1991-05-03  |  592b  |  24 lines

  1. /*    v_fill_s.c- Workhorse Function: Fill Screen Region */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <conio.h>
  6. #include <tools/viewport.h>
  7.  
  8. void _v_fill_scr( int c_att, int row, int col, int nrows, int ncols )
  9. {
  10.     /* Fill the indicated region of the screen with c_att, which is
  11.      * a character/attribute pair. row and col start at (0,0)
  12.      */
  13.  
  14.     int i;
  15.     int buf[ VMAXCOLS ], *bp;
  16.  
  17.     bp = buf;
  18.         for( i = ncols ; --i >= 0 ; )
  19.             *bp++ = c_att;
  20.  
  21.     for(; --nrows >= 0 ; ++row )
  22.         puttext( col+1, row+1, col+ncols, row+1, buf );
  23. }
  24.