167 |
|
pctdone = 100.0*i/vresolu; |
168 |
|
if (ralrm > 0) /* report init stats */ |
169 |
|
report(); |
170 |
+ |
#ifndef BSD |
171 |
+ |
else |
172 |
+ |
#endif |
173 |
+ |
signal(SIGALRM, report); |
174 |
|
ypos = vresolu-1 - i; |
175 |
|
fillscanline(scanbar[0], zbar[0], hresolu, ypos, psample); |
176 |
|
ystep = psample; |
192 |
|
/* fill bar */ |
193 |
|
fillscanbar(scanbar, zbar, hresolu, ypos, ystep); |
194 |
|
/* write it out */ |
195 |
+ |
#ifndef BSD |
196 |
+ |
signal(SIGALRM, SIG_IGN); /* don't interrupt writes */ |
197 |
+ |
#endif |
198 |
|
for (i = ystep; i > 0; i--) { |
199 |
|
if (zfd != -1 && write(zfd, (char *)zbar[i], |
200 |
|
hresolu*sizeof(float)) |
209 |
|
pctdone = 100.0*(vresolu-1-ypos)/vresolu; |
210 |
|
if (ralrm > 0 && time((long *)0) >= tlastrept+ralrm) |
211 |
|
report(); |
212 |
+ |
#ifndef BSD |
213 |
+ |
else |
214 |
+ |
signal(SIGALRM, report); |
215 |
+ |
#endif |
216 |
|
} |
217 |
|
/* clean up */ |
218 |
|
if (zfd != -1) { |