ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/tonemap.c
(Generate patch)

Comparing ray/src/common/tonemap.c (file contents):
Revision 3.12 by greg, Tue Jul 15 00:30:09 2003 UTC vs.
Revision 3.13 by schorsch, Sun Jul 27 22:12:01 2003 UTC

# Line 170 | Line 170 | int    len;
170  
171          if (tmTop == NULL)
172                  returnErr(TM_E_TMINVAL);
173 <        if (ls == NULL | scan == NULL | len < 0)
173 >        if ((ls == NULL) | (scan == NULL) | (len < 0))
174                  returnErr(TM_E_ILLEGAL);
175          for (i = len; i--; ) {
176                  if (tmNeedMatrix(tmTop))                /* get monitor RGB */
# Line 243 | Line 243 | int    len;
243  
244          if (tmTop == NULL)
245                  returnErr(TM_E_TMINVAL);
246 <        if (ls == NULL | scan == NULL | len < 0)
246 >        if ((ls == NULL) | (scan == NULL) | (len < 0))
247                  returnErr(TM_E_ILLEGAL);
248          for (i = len; i--; )
249                  if (scan[i] <= TM_NOLUM) {
# Line 428 | Line 428 | double Ldmax;
428                                          /* clamp histogram */
429          histo = (int *)malloc(histlen*sizeof(int));
430          cumf = (float *)malloc((histlen+2)*sizeof(float));
431 <        if (histo == NULL | cumf == NULL)
431 >        if ((histo == NULL) | (cumf == NULL))
432                  returnErr(TM_E_NOMEM);
433          cumf[histlen+1] = 1.;           /* guard for assignment code */
434          for (i = histlen; i--; )        /* make malleable copy */
# Line 496 | Line 496 | int    len;
496  
497          if (tmTop == NULL || tmTop->lumap == NULL)
498                  returnErr(TM_E_TMINVAL);
499 <        if (ps == NULL | ls == NULL | len < 0)
499 >        if ((ps == NULL) | (ls == NULL) | (len < 0))
500                  returnErr(TM_E_ILLEGAL);
501          while (len--) {
502                  if ((li = *ls++) < tmTop->mbrmin) {
# Line 538 | Line 538 | register struct tmStruct       *tms;
538   {
539          register struct tmStruct        *tms2;
540                                          /* special cases first */
541 <        if (tms == NULL | tmTop == NULL)
541 >        if ((tms == NULL) | (tmTop == NULL))
542                  return(0);
543          if (tms == tmTop) {
544                  tmTop = tms->tmprev;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines