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

Comparing ray/src/rt/rtrace.c (file contents):
Revision 2.107 by greg, Wed Nov 15 18:02:53 2023 UTC vs.
Revision 2.110 by greg, Mon Dec 11 18:33:53 2023 UTC

# Line 87 | Line 87 | static double nextray(FVECT org, FVECT dir);
87   static void tabin(RAY *r);
88   static void ourtrace(RAY *r);
89  
90 < static void  putscolor(const COLORV *scol);
90 > static void  putscolor(COLORV *scol);
91  
92   static oputf_t *ray_out[32], *every_out[32];
93   static putf_t *putreal;
# Line 253 | Line 253 | setrtoutput(void)                      /* set up output tables, return #c
253          case 'c':
254                  if (outvals[1] || !strchr("vrx", outvals[0]))
255                          error(USER, "color format only with -ov, -or, -ox");
256 +                if (nco < 3)
257 +                        error(USER, "color format incompatible with -pY, -pS, -pM");
258                  break;
259          default:
260                  error(CONSISTENCY, "botched output format");
# Line 924 | Line 926 | static void
926   putd(RREAL *v, int n)           /* output binary double(s) */
927   {
928   #ifdef  SMLFLT
929 <        double  da[3];
929 >        double  da[MAXCSAMP];
930          int     i;
931  
932 <        if (n > 3)
932 >        if (n > MAXCSAMP)
933                  error(INTERNAL, "code error in putd()");
934          for (i = n; i--; )
935                  da[i] = v[i];
# Line 942 | Line 944 | static void
944   putf(RREAL *v, int n)           /* output binary float(s) */
945   {
946   #ifndef SMLFLT
947 <        float   fa[3];
947 >        float   fa[MAXCSAMP];
948          int     i;
949  
950 <        if (n > 3)
950 >        if (n > MAXCSAMP)
951                  error(INTERNAL, "code error in putf()");
952          for (i = n; i--; )
953                  fa[i] = v[i];
# Line 957 | Line 959 | putf(RREAL *v, int n)          /* output binary float(s) */
959  
960  
961   static void
962 < putscolor(const COLORV *scol)           /* output (spectral) color */
962 > putscolor(COLORV *scol)         /* output (spectral) color */
963   {
964          static COLORMAT xyz2myrgbmat;
965          SCOLOR          my_scol;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines