FILE *in;
char *buf,tmp[256],*s;
char stars[512];
int i;
in=fopen("myfile","r");
while(!feof(in)){
*tmp=0x00;
if(fgets(tmp,255,in)!=NULL){
memset(stars,0x00,512);
for(buf=tmp,s=stars;*buf;buf++)
if(*buf==0x20)
for(i=0;i<3;i++) *s++='*';
else
*s++=*buf;
// stars now has the spaces replaced with three *
// do something with the string stars
}
}
fclose(in);