25 |
|
#define MINADIV 7 /* minimum # divisions in each dimension */ |
26 |
|
#endif |
27 |
|
|
28 |
– |
extern void SDsquare2disk(double ds[2], double seedx, double seedy); |
29 |
– |
|
28 |
|
typedef struct { |
31 |
– |
COLOR v; /* hemisphere sample value */ |
32 |
– |
float d; /* reciprocal distance */ |
29 |
|
FVECT p; /* intersection point */ |
30 |
+ |
float d; /* reciprocal distance */ |
31 |
+ |
SCOLOR v; /* hemisphere sample value */ |
32 |
|
} AMBSAMP; /* sample value */ |
33 |
|
|
34 |
|
typedef struct { |
35 |
|
RAY *rp; /* originating ray sample */ |
36 |
|
int ns; /* number of samples per axis */ |
37 |
|
int sampOK; /* acquired full sample set? */ |
38 |
< |
COLOR acoef; /* division contribution coefficient */ |
39 |
< |
double acol[3]; /* accumulated color */ |
38 |
> |
int atyp; /* RAMBIENT or TAMBIENT */ |
39 |
> |
SCOLOR acoef; /* division contribution coefficient */ |
40 |
> |
SCOLOR acol; /* accumulated color */ |
41 |
> |
FVECT onrm; /* oriented unperturbed surface normal */ |
42 |
|
FVECT ux, uy; /* tangent axis unit vectors */ |
43 |
|
AMBSAMP sa[1]; /* sample array (extends struct) */ |
44 |
|
} AMBHEMI; /* ambient sample hemisphere */ |
100 |
|
AMBSAMP *ap = &ambsam(hp,i,j); |
101 |
|
RAY ar; |
102 |
|
int hlist[3], ii; |
103 |
< |
double spt[2], zd; |
103 |
> |
double ss[2]; |
104 |
> |
RREAL spt[2]; |
105 |
> |
double zd; |
106 |
|
/* generate hemispherical sample */ |
107 |
|
/* ambient coefficient for weight */ |
108 |
|
if (ambacc > FTINY) |
109 |
< |
setcolor(ar.rcoef, AVGREFL, AVGREFL, AVGREFL); |
109 |
> |
setscolor(ar.rcoef, AVGREFL, AVGREFL, AVGREFL); |
110 |
|
else |
111 |
< |
copycolor(ar.rcoef, hp->acoef); |
112 |
< |
if (rayorigin(&ar, AMBIENT, hp->rp, ar.rcoef) < 0) |
111 |
> |
copyscolor(ar.rcoef, hp->acoef); |
112 |
> |
if (rayorigin(&ar, hp->atyp, hp->rp, ar.rcoef) < 0) |
113 |
|
return(0); |
114 |
|
if (ambacc > FTINY) { |
115 |
< |
multcolor(ar.rcoef, hp->acoef); |
116 |
< |
scalecolor(ar.rcoef, 1./AVGREFL); |
115 |
> |
#ifdef SSKIPOPT |
116 |
> |
ar.rsrc = -1; /* protect cache from source opt. */ |
117 |
> |
ar.scorr = 1.f; |
118 |
> |
#endif |
119 |
> |
smultscolor(ar.rcoef, hp->acoef); |
120 |
> |
scalescolor(ar.rcoef, 1./AVGREFL); |
121 |
|
} |
122 |
|
hlist[0] = hp->rp->rno; |
123 |
< |
hlist[1] = j; |
124 |
< |
hlist[2] = i; |
125 |
< |
multisamp(spt, 2, urand(ilhash(hlist,3)+n)); |
123 |
> |
hlist[1] = AI(hp,i,j); |
124 |
> |
hlist[2] = samplendx; |
125 |
> |
multisamp(ss, 2, urand(ilhash(hlist,3)+n)); |
126 |
|
resample: |
127 |
< |
SDsquare2disk(spt, (j+spt[1])/hp->ns, (i+spt[0])/hp->ns); |
127 |
> |
square2disk(spt, (j+ss[1])/hp->ns, (i+ss[0])/hp->ns); |
128 |
|
zd = sqrt(1. - spt[0]*spt[0] - spt[1]*spt[1]); |
129 |
|
for (ii = 3; ii--; ) |
130 |
|
ar.rdir[ii] = spt[0]*hp->ux[ii] + |
131 |
|
spt[1]*hp->uy[ii] + |
132 |
< |
zd*hp->rp->ron[ii]; |
132 |
> |
zd*hp->onrm[ii]; |
133 |
|
checknorm(ar.rdir); |
134 |
|
/* avoid coincident samples */ |
135 |
< |
if (!n && ambcollision(hp, i, j, ar.rdir)) { |
136 |
< |
spt[0] = frandom(); spt[1] = frandom(); |
135 |
> |
if (!n && hp->ns >= 4 && ambcollision(hp, i, j, ar.rdir)) { |
136 |
> |
ss[0] = frandom(); ss[1] = frandom(); |
137 |
|
goto resample; /* reject this sample */ |
138 |
|
} |
139 |
|
dimlist[ndims++] = AI(hp,i,j) + 90171; |
142 |
|
zd = raydistance(&ar); |
143 |
|
if (zd <= FTINY) |
144 |
|
return(0); /* should never happen */ |
145 |
< |
multcolor(ar.rcol, ar.rcoef); /* apply coefficient */ |
145 |
> |
smultscolor(ar.rcol, ar.rcoef); /* apply coefficient */ |
146 |
|
if (zd*ap->d < 1.0) /* new/closer distance? */ |
147 |
|
ap->d = 1.0/zd; |
148 |
|
if (!n) { /* record first vertex & value */ |
149 |
|
if (zd > 10.0*thescene.cusize + 1000.) |
150 |
|
zd = 10.0*thescene.cusize + 1000.; |
151 |
|
VSUM(ap->p, ar.rorg, ar.rdir, zd); |
152 |
< |
copycolor(ap->v, ar.rcol); |
152 |
> |
copyscolor(ap->v, ar.rcol); |
153 |
|
} else { /* else update recorded value */ |
154 |
< |
hp->acol[RED] -= colval(ap->v,RED); |
149 |
< |
hp->acol[GRN] -= colval(ap->v,GRN); |
150 |
< |
hp->acol[BLU] -= colval(ap->v,BLU); |
154 |
> |
sopscolor(hp->acol, -=, ap->v); |
155 |
|
zd = 1.0/(double)(n+1); |
156 |
< |
scalecolor(ar.rcol, zd); |
156 |
> |
scalescolor(ar.rcol, zd); |
157 |
|
zd *= (double)n; |
158 |
< |
scalecolor(ap->v, zd); |
159 |
< |
addcolor(ap->v, ar.rcol); |
158 |
> |
scalescolor(ap->v, zd); |
159 |
> |
saddscolor(ap->v, ar.rcol); |
160 |
|
} |
161 |
< |
addcolor(hp->acol, ap->v); /* add to our sum */ |
161 |
> |
saddscolor(hp->acol, ap->v); /* add to our sum */ |
162 |
|
return(1); |
163 |
|
} |
164 |
|
|
167 |
|
static float * |
168 |
|
getambdiffs(AMBHEMI *hp) |
169 |
|
{ |
170 |
< |
const double normf = 1./bright(hp->acoef); |
171 |
< |
float *earr = (float *)calloc(hp->ns*hp->ns, sizeof(float)); |
170 |
> |
const double normf = 1./(pbright(hp->acoef) + FTINY); |
171 |
> |
float *earr = (float *)calloc(2*hp->ns*hp->ns, sizeof(float)); |
172 |
|
float *ep; |
173 |
|
AMBSAMP *ap; |
174 |
|
double b, b1, d2; |
177 |
|
if (earr == NULL) /* out of memory? */ |
178 |
|
return(NULL); |
179 |
|
/* sum squared neighbor diffs */ |
180 |
< |
for (ap = hp->sa, ep = earr, i = 0; i < hp->ns; i++) |
180 |
> |
ap = hp->sa; |
181 |
> |
ep = earr + hp->ns*hp->ns; /* original estimates to scratch */ |
182 |
> |
for (i = 0; i < hp->ns; i++) |
183 |
|
for (j = 0; j < hp->ns; j++, ap++, ep++) { |
184 |
< |
b = bright(ap[0].v); |
184 |
> |
b = pbright(ap[0].v); |
185 |
|
if (i) { /* from above */ |
186 |
< |
b1 = bright(ap[-hp->ns].v); |
186 |
> |
b1 = pbright(ap[-hp->ns].v); |
187 |
|
d2 = b - b1; |
188 |
< |
d2 *= d2*normf/(b + b1); |
188 |
> |
d2 *= d2*normf/(b + b1 + FTINY); |
189 |
|
ep[0] += d2; |
190 |
|
ep[-hp->ns] += d2; |
191 |
|
} |
192 |
|
if (!j) continue; |
193 |
|
/* from behind */ |
194 |
< |
b1 = bright(ap[-1].v); |
194 |
> |
b1 = pbright(ap[-1].v); |
195 |
|
d2 = b - b1; |
196 |
< |
d2 *= d2*normf/(b + b1); |
196 |
> |
d2 *= d2*normf/(b + b1 + FTINY); |
197 |
|
ep[0] += d2; |
198 |
|
ep[-1] += d2; |
199 |
|
if (!i) continue; |
200 |
|
/* diagonal */ |
201 |
< |
b1 = bright(ap[-hp->ns-1].v); |
201 |
> |
b1 = pbright(ap[-hp->ns-1].v); |
202 |
|
d2 = b - b1; |
203 |
< |
d2 *= d2*normf/(b + b1); |
203 |
> |
d2 *= d2*normf/(b + b1 + FTINY); |
204 |
|
ep[0] += d2; |
205 |
|
ep[-hp->ns-1] += d2; |
206 |
|
} |
207 |
|
/* correct for number of neighbors */ |
208 |
< |
earr[0] *= 8./3.; |
209 |
< |
earr[hp->ns-1] *= 8./3.; |
210 |
< |
earr[(hp->ns-1)*hp->ns] *= 8./3.; |
211 |
< |
earr[(hp->ns-1)*hp->ns + hp->ns-1] *= 8./3.; |
208 |
> |
ep = earr + hp->ns*hp->ns; |
209 |
> |
ep[0] *= 6./3.; |
210 |
> |
ep[hp->ns-1] *= 6./3.; |
211 |
> |
ep[(hp->ns-1)*hp->ns] *= 6./3.; |
212 |
> |
ep[(hp->ns-1)*hp->ns + hp->ns-1] *= 6./3.; |
213 |
|
for (i = 1; i < hp->ns-1; i++) { |
214 |
< |
earr[i*hp->ns] *= 8./5.; |
215 |
< |
earr[i*hp->ns + hp->ns-1] *= 8./5.; |
214 |
> |
ep[i*hp->ns] *= 6./5.; |
215 |
> |
ep[i*hp->ns + hp->ns-1] *= 6./5.; |
216 |
|
} |
217 |
|
for (j = 1; j < hp->ns-1; j++) { |
218 |
< |
earr[j] *= 8./5.; |
219 |
< |
earr[(hp->ns-1)*hp->ns + j] *= 8./5.; |
218 |
> |
ep[j] *= 6./5.; |
219 |
> |
ep[(hp->ns-1)*hp->ns + j] *= 6./5.; |
220 |
|
} |
221 |
+ |
/* blur final map to reduce bias */ |
222 |
+ |
for (i = 0; i < hp->ns-1; i++) { |
223 |
+ |
float *ep2; |
224 |
+ |
ep = earr + i*hp->ns; |
225 |
+ |
ep2 = ep + hp->ns*hp->ns; |
226 |
+ |
for (j = 0; j < hp->ns-1; j++, ep++, ep2++) { |
227 |
+ |
ep[0] += .5*ep2[0] + .125*(ep2[1] + ep2[hp->ns]); |
228 |
+ |
ep[1] += .125*ep2[0]; |
229 |
+ |
ep[hp->ns] += .125*ep2[0]; |
230 |
+ |
} |
231 |
+ |
} |
232 |
|
return(earr); |
233 |
|
} |
234 |
|
|
264 |
|
|
265 |
|
static AMBHEMI * |
266 |
|
samp_hemi( /* sample indirect hemisphere */ |
267 |
< |
COLOR rcol, |
267 |
> |
SCOLOR rcol, |
268 |
|
RAY *r, |
269 |
|
double wt |
270 |
|
) |
271 |
|
{ |
272 |
+ |
int backside = (wt < 0); |
273 |
|
AMBHEMI *hp; |
274 |
|
double d; |
275 |
|
int n, i, j; |
276 |
|
/* insignificance check */ |
277 |
< |
if (bright(rcol) <= FTINY) |
277 |
> |
d = sintens(rcol); |
278 |
> |
if (d <= FTINY) |
279 |
|
return(NULL); |
280 |
|
/* set number of divisions */ |
281 |
+ |
if (backside) wt = -wt; |
282 |
|
if (ambacc <= FTINY && |
283 |
< |
wt > (d = 0.8*intens(rcol)*r->rweight/(ambdiv*minweight))) |
283 |
> |
wt > (d *= 0.8*r->rweight/(ambdiv*minweight + 1e-20))) |
284 |
|
wt = d; /* avoid ray termination */ |
285 |
|
n = sqrt(ambdiv * wt) + 0.5; |
286 |
|
i = 1 + (MINADIV-1)*(ambacc > FTINY); |
290 |
|
hp = (AMBHEMI *)malloc(sizeof(AMBHEMI) + sizeof(AMBSAMP)*(n*n - 1)); |
291 |
|
if (hp == NULL) |
292 |
|
error(SYSTEM, "out of memory in samp_hemi"); |
293 |
+ |
|
294 |
+ |
if (backside) { |
295 |
+ |
hp->atyp = TAMBIENT; |
296 |
+ |
hp->onrm[0] = -r->ron[0]; |
297 |
+ |
hp->onrm[1] = -r->ron[1]; |
298 |
+ |
hp->onrm[2] = -r->ron[2]; |
299 |
+ |
} else { |
300 |
+ |
hp->atyp = RAMBIENT; |
301 |
+ |
VCOPY(hp->onrm, r->ron); |
302 |
+ |
} |
303 |
|
hp->rp = r; |
304 |
|
hp->ns = n; |
305 |
< |
hp->acol[RED] = hp->acol[GRN] = hp->acol[BLU] = 0.0; |
305 |
> |
scolorblack(hp->acol); |
306 |
|
memset(hp->sa, 0, sizeof(AMBSAMP)*n*n); |
307 |
|
hp->sampOK = 0; |
308 |
|
/* assign coefficient */ |
309 |
< |
copycolor(hp->acoef, rcol); |
309 |
> |
copyscolor(hp->acoef, rcol); |
310 |
|
d = 1.0/(n*n); |
311 |
< |
scalecolor(hp->acoef, d); |
311 |
> |
scalescolor(hp->acoef, d); |
312 |
|
/* make tangent plane axes */ |
313 |
< |
if (!getperpendicular(hp->ux, r->ron, 1)) |
313 |
> |
if (!getperpendicular(hp->ux, hp->onrm, 1)) |
314 |
|
error(CONSISTENCY, "bad ray direction in samp_hemi"); |
315 |
< |
VCROSS(hp->uy, r->ron, hp->ux); |
315 |
> |
VCROSS(hp->uy, hp->onrm, hp->ux); |
316 |
|
/* sample divisions */ |
317 |
|
for (i = hp->ns; i--; ) |
318 |
|
for (j = hp->ns; j--; ) |
319 |
|
hp->sampOK += ambsample(hp, i, j, 0); |
320 |
< |
copycolor(rcol, hp->acol); |
320 |
> |
copyscolor(rcol, hp->acol); |
321 |
|
if (!hp->sampOK) { /* utter failure? */ |
322 |
|
free(hp); |
323 |
|
return(NULL); |
329 |
|
if (hp->sampOK <= MINADIV*MINADIV) |
330 |
|
return(hp); /* don't bother super-sampling */ |
331 |
|
n = ambssamp*wt + 0.5; |
332 |
< |
if (n > 8) { /* perform super-sampling? */ |
332 |
> |
if (n >= 4*hp->ns) { /* perform super-sampling? */ |
333 |
|
ambsupersamp(hp, n); |
334 |
< |
copycolor(rcol, hp->acol); |
334 |
> |
copyscolor(rcol, hp->acol); |
335 |
|
} |
336 |
|
return(hp); /* all is well */ |
337 |
|
} |
343 |
|
{ |
344 |
|
if (hp->sa[n1].d <= hp->sa[n2].d) { |
345 |
|
if (hp->sa[n1].d <= hp->sa[n3].d) |
346 |
< |
return(colval(hp->sa[n1].v,CIEY)); |
347 |
< |
return(colval(hp->sa[n3].v,CIEY)); |
346 |
> |
return(hp->sa[n1].v[0]); |
347 |
> |
return(hp->sa[n3].v[0]); |
348 |
|
} |
349 |
|
if (hp->sa[n2].d <= hp->sa[n3].d) |
350 |
< |
return(colval(hp->sa[n2].v,CIEY)); |
351 |
< |
return(colval(hp->sa[n3].v,CIEY)); |
350 |
> |
return(hp->sa[n2].v[0]); |
351 |
> |
return(hp->sa[n3].v[0]); |
352 |
|
} |
353 |
|
|
354 |
|
|
577 |
|
for (j = 0; j < hp->ns-1; j++) { |
578 |
|
comp_fftri(&fftr, hp, AI(hp,0,j), AI(hp,0,j+1)); |
579 |
|
if (hessrow != NULL) |
580 |
< |
comp_hessian(hessrow[j], &fftr, hp->rp->ron); |
580 |
> |
comp_hessian(hessrow[j], &fftr, hp->onrm); |
581 |
|
if (gradrow != NULL) |
582 |
< |
comp_gradient(gradrow[j], &fftr, hp->rp->ron); |
582 |
> |
comp_gradient(gradrow[j], &fftr, hp->onrm); |
583 |
|
} |
584 |
|
/* sum each row of triangles */ |
585 |
|
for (i = 0; i < hp->ns-1; i++) { |
587 |
|
FVECT gradcol; |
588 |
|
comp_fftri(&fftr, hp, AI(hp,i,0), AI(hp,i+1,0)); |
589 |
|
if (hessrow != NULL) |
590 |
< |
comp_hessian(hesscol, &fftr, hp->rp->ron); |
590 |
> |
comp_hessian(hesscol, &fftr, hp->onrm); |
591 |
|
if (gradrow != NULL) |
592 |
< |
comp_gradient(gradcol, &fftr, hp->rp->ron); |
592 |
> |
comp_gradient(gradcol, &fftr, hp->onrm); |
593 |
|
for (j = 0; j < hp->ns-1; j++) { |
594 |
|
FVECT hessdia[3]; /* compute triangle contributions */ |
595 |
|
FVECT graddia; |
599 |
|
/* diagonal (inner) edge */ |
600 |
|
comp_fftri(&fftr, hp, AI(hp,i,j+1), AI(hp,i+1,j)); |
601 |
|
if (hessrow != NULL) { |
602 |
< |
comp_hessian(hessdia, &fftr, hp->rp->ron); |
602 |
> |
comp_hessian(hessdia, &fftr, hp->onrm); |
603 |
|
rev_hessian(hesscol); |
604 |
|
add2hessian(hessian, hessrow[j], hessdia, hesscol, backg); |
605 |
|
} |
606 |
|
if (gradrow != NULL) { |
607 |
< |
comp_gradient(graddia, &fftr, hp->rp->ron); |
607 |
> |
comp_gradient(graddia, &fftr, hp->onrm); |
608 |
|
rev_gradient(gradcol); |
609 |
|
add2gradient(gradient, gradrow[j], graddia, gradcol, backg); |
610 |
|
} |
611 |
|
/* initialize edge in next row */ |
612 |
|
comp_fftri(&fftr, hp, AI(hp,i+1,j+1), AI(hp,i+1,j)); |
613 |
|
if (hessrow != NULL) |
614 |
< |
comp_hessian(hessrow[j], &fftr, hp->rp->ron); |
614 |
> |
comp_hessian(hessrow[j], &fftr, hp->onrm); |
615 |
|
if (gradrow != NULL) |
616 |
< |
comp_gradient(gradrow[j], &fftr, hp->rp->ron); |
616 |
> |
comp_gradient(gradrow[j], &fftr, hp->onrm); |
617 |
|
/* new column edge & paired triangle */ |
618 |
|
backg = back_ambval(hp, AI(hp,i+1,j+1), |
619 |
|
AI(hp,i+1,j), AI(hp,i,j+1)); |
620 |
|
comp_fftri(&fftr, hp, AI(hp,i,j+1), AI(hp,i+1,j+1)); |
621 |
|
if (hessrow != NULL) { |
622 |
< |
comp_hessian(hesscol, &fftr, hp->rp->ron); |
622 |
> |
comp_hessian(hesscol, &fftr, hp->onrm); |
623 |
|
rev_hessian(hessdia); |
624 |
|
add2hessian(hessian, hessrow[j], hessdia, hesscol, backg); |
625 |
|
if (i < hp->ns-2) |
626 |
|
rev_hessian(hessrow[j]); |
627 |
|
} |
628 |
|
if (gradrow != NULL) { |
629 |
< |
comp_gradient(gradcol, &fftr, hp->rp->ron); |
629 |
> |
comp_gradient(gradcol, &fftr, hp->onrm); |
630 |
|
rev_gradient(graddia); |
631 |
|
add2gradient(gradient, gradrow[j], graddia, gradcol, backg); |
632 |
|
if (i < hp->ns-2) |
662 |
|
/* use vector for azimuth + 90deg */ |
663 |
|
VSUB(vd, ap->p, hp->rp->rop); |
664 |
|
/* brightness over cosine factor */ |
665 |
< |
gfact = colval(ap->v,CIEY) / DOT(hp->rp->ron, vd); |
665 |
> |
gfact = ap->v[0] / DOT(hp->onrm, vd); |
666 |
|
/* sine = proj_radius/vd_length */ |
667 |
|
dgsum[0] -= DOT(uv[1], vd) * gfact; |
668 |
|
dgsum[1] += DOT(uv[0], vd) * gfact; |
718 |
|
|
719 |
|
int |
720 |
|
doambient( /* compute ambient component */ |
721 |
< |
COLOR rcol, /* input/output color */ |
721 |
> |
SCOLOR rcol, /* input/output color */ |
722 |
|
RAY *r, |
723 |
< |
double wt, |
723 |
> |
double wt, /* negative for back side */ |
724 |
|
FVECT uv[2], /* returned (optional) */ |
725 |
|
float ra[2], /* returned (optional) */ |
726 |
|
float pg[2], /* returned (optional) */ |
752 |
|
free(hp); /* Hessian not requested/possible */ |
753 |
|
return(-1); /* value-only return value */ |
754 |
|
} |
755 |
< |
if ((d = bright(rcol)) > FTINY) { /* normalize Y values */ |
756 |
< |
d = 0.99*(hp->ns*hp->ns)/d; |
755 |
> |
if ((d = scolor_mean(rcol)) > FTINY) { |
756 |
> |
d = 0.99*(hp->ns*hp->ns)/d; /* normalize avg. values */ |
757 |
|
K = 0.01; |
758 |
|
} else { /* or fall back on geometric Hessian */ |
759 |
|
K = 1.0; |
761 |
|
dg = NULL; |
762 |
|
crlp = NULL; |
763 |
|
} |
764 |
< |
ap = hp->sa; /* relative Y channel from here on... */ |
764 |
> |
ap = hp->sa; /* single channel from here on... */ |
765 |
|
for (i = hp->ns*hp->ns; i--; ap++) |
766 |
< |
colval(ap->v,CIEY) = bright(ap->v)*d + K; |
766 |
> |
ap->v[0] = scolor_mean(ap->v)*d + K; |
767 |
|
|
768 |
|
if (uv == NULL) /* make sure we have axis pointers */ |
769 |
|
uv = my_uv; |
787 |
|
if (ra[1] < minarad) |
788 |
|
ra[1] = minarad; |
789 |
|
} |
790 |
< |
ra[0] *= d = 1.0/sqrt(wt); |
790 |
> |
ra[0] *= d = 1.0/sqrt(fabs(wt)); |
791 |
|
if ((ra[1] *= d) > 2.0*ra[0]) |
792 |
|
ra[1] = 2.0*ra[0]; |
793 |
|
if (ra[1] > maxarad) { |
796 |
|
ra[0] = maxarad; |
797 |
|
} |
798 |
|
/* flag encroached directions */ |
799 |
< |
if (crlp != NULL) |
799 |
> |
if (crlp != NULL) /* XXX doesn't update with changes to ambacc */ |
800 |
|
*crlp = ambcorral(hp, uv, ra[0]*ambacc, ra[1]*ambacc); |
801 |
|
if (pg != NULL) { /* cap gradient if necessary */ |
802 |
|
d = pg[0]*pg[0]*ra[0]*ra[0] + pg[1]*pg[1]*ra[1]*ra[1]; |
810 |
|
free(hp); /* clean up and return */ |
811 |
|
return(1); |
812 |
|
} |
782 |
– |
|