home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 328_02 / wsetc.c < prev    next >
C/C++ Source or Header  |  1991-03-17  |  547b  |  34 lines

  1. /* wsetc() - set all chars in window to a specified char
  2.  *              starting at current position, going to end of window
  3.  */
  4. #include "wsys.h"
  5.  
  6. void wsetc( char c )
  7.     {
  8.     int x, y, l, t, r, b;
  9.     unsigned char a;
  10.     
  11.     
  12.     a = w0-> winattr;
  13.     l = w0-> winleft;
  14.     t = w0-> wintop;
  15.     x = w0-> winx      + l;
  16.     r = w0-> winxmax + l;
  17.     y = w0-> winy      + t;
  18.     b = w0-> winymax + t;
  19.     
  20.     do 
  21.         {
  22.         do 
  23.             {
  24.             wputcabs ( x, y, c, a, WGOVERWRITE );
  25.             ++x;
  26.             }
  27.         while ( x <= r );
  28.         x=l;
  29.         ++y;
  30.         }
  31.     while ( y <= b );
  32.     
  33.     return;        /* wsetc */
  34.     }