687 |
|
if (out_psa > psa[1]) |
688 |
|
psa[1] = out_psa; |
689 |
|
/* fall through */ |
690 |
– |
case SDqueryMin: |
690 |
|
case SDqueryVal: |
691 |
|
if (qflags == SDqueryVal) |
692 |
|
psa[0] = M_PI; |
693 |
+ |
/* fall through */ |
694 |
+ |
case SDqueryMin: |
695 |
|
if ((inc_psa > 0) & (inc_psa < psa[0])) |
696 |
|
psa[0] = inc_psa; |
697 |
|
if ((out_psa > 0) & (out_psa < psa[0])) |
762 |
|
reverse = 1; |
763 |
|
} |
764 |
|
cdlast = NULL; /* check for it in cache list */ |
765 |
< |
for (cd = (SDMatCDst *)sdc->cdList; |
766 |
< |
cd != NULL; cd = (SDMatCDst *)cd->next) { |
765 |
> |
for (cd = (SDMatCDst *)sdc->cdList; cd != NULL; |
766 |
> |
cdlast = cd, cd = (SDMatCDst *)cd->next) |
767 |
|
if (cd->indx == myCD.indx && (cd->calen == myCD.calen) & |
768 |
|
(cd->ob_priv == myCD.ob_priv) & |
769 |
|
(cd->ob_vec == myCD.ob_vec)) |
770 |
|
break; |
770 |
– |
cdlast = cd; |
771 |
– |
} |
771 |
|
if (cd == NULL) { /* need to allocate new entry */ |
772 |
|
cd = (SDMatCDst *)malloc(sizeof(SDMatCDst) + |
773 |
< |
myCD.calen*sizeof(myCD.carr[0])); |
773 |
> |
sizeof(myCD.carr[0])*myCD.calen); |
774 |
|
if (cd == NULL) |
775 |
|
return NULL; |
776 |
|
*cd = myCD; /* compute cumulative distribution */ |