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

Comparing ray/src/cv/mgflib/context.c (file contents):
Revision 1.21 by greg, Thu Apr 13 12:11:26 1995 UTC vs.
Revision 1.23 by greg, Mon Aug 28 16:44:12 1995 UTC

# Line 105 | Line 105 | register char  **av;
105                          c_ccname = NULL;
106                          return(MG_OK);
107                  }
108 +                if (!isname(av[1]))
109 +                        return(MG_EILL);
110                  lp = lu_find(&clr_tab, av[1]);  /* lookup context */
111                  if (lp == NULL)
112                          return(MG_EMEM);
# Line 221 | Line 223 | register char  **av;
223                          c_cmname = NULL;
224                          return(MG_OK);
225                  }
226 +                if (!isname(av[1]))
227 +                        return(MG_EILL);
228                  lp = lu_find(&mat_tab, av[1]);  /* lookup context */
229                  if (lp == NULL)
230                          return(MG_EMEM);
# Line 366 | Line 370 | register char  **av;
370                          c_cvname = NULL;
371                          return(MG_OK);
372                  }
373 +                if (!isname(av[1]))
374 +                        return(MG_EILL);
375                  lp = lu_find(&vtx_tab, av[1]);  /* lookup context */
376                  if (lp == NULL)
377                          return(MG_EMEM);
# Line 600 | Line 606 | char   **av;
606                  }
607                  if (n > 1)
608                          va[i] /= (double)n;
603                if (va[i] < 0.)
604                        return(MG_EILL);
609                  if (va[i] > scale)
610                          scale = va[i];
611 +                else if (va[i] < -scale)
612 +                        scale = -va[i];
613          }
614          if (scale <= FTINY)
615                  return(MG_EILL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines