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

Comparing ray/src/rt/t_func.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:41:46 1989 UTC vs.
Revision 1.2 by greg, Tue Feb 21 14:56:22 1989 UTC

# Line 40 | Line 40 | t_func(m, r)                   /* compute texture for ray */
40   register OBJREC  *m;
41   register RAY  *r;
42   {
43 #define  mxf    ((XFORM *)m->os)
43          extern double  varvalue();
44          extern int  errno;
45          FVECT  disp;
46 +        register XFORM  *mxf;
47          register int  i;
48          register char  **sa;
49  
# Line 51 | Line 51 | register RAY  *r;
51                  objerror(m, USER, "bad # arguments");
52          sa = m->oargs.sarg;
53  
54 <        if (mxf == NULL) {
54 >        if ((mxf = (XFORM *)m->os) == NULL) {
55                  mxf = (XFORM *)malloc(sizeof(XFORM));
56                  if (mxf == NULL)
57                          goto memerr;
# Line 68 | Line 68 | register RAY  *r;
68                                  m->oargs.nsargs-4, sa+4);
69                  if (mxf->back.sca < 0.0)
70                          mxf->back.sca = -mxf->back.sca;
71 +                m->os = (char *)mxf;
72          }
73  
74          setmap(m, r, mxf->back.sca, mxf->back.xfm);
# Line 93 | Line 94 | register RAY  *r;
94          return;
95   memerr:
96          error(SYSTEM, "out of memory in t_func");
96 #undef  mxf
97   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines