home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume8
/
unidraw
/
part01
/
fill.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-12-19
|
773b
|
34 lines
#ifndef LINT
static char COPYRIGHT[]="\
COPYRIGHT --- COPYRIGHT --- COPYRIGHT --- COPYRIGHT \n\
This program is copyright 1989 Nils McCarthy. This \
program may be distributed if it is impossible for \
the distributor to get a more up-to-date-version of \
it. \n\
COPYRIGHT --- COPYRIGHT --- COPYRIGHT --- COPYRIGHT \n\
";
static char AUTHOR[]="Copyright 1989 Nils McCarthy";
#endif /* LINT */
#include "unidraw.h"
fill(x,y)
{
int xl=x,xr=x,i;
while(pad(y,xl)==' ' && xr>=0)
xl--;
while(pad(y,xr)==' ' && xr<=PADCOLS)
xr++;
xl++;
xr--;
for(i=xl;i<=xr;i++)
pad(y,i)=pench;
for(i=xl;i<=xr;i++) {
if(y>0 && pad(y-1,i)==' ')
fill(i,y-1);
if(y<PADLINES && pad(y+1,i)==' ')
fill(i,y+1);
}
refresh();
}