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

Comparing ray/src/rt/text.c (file contents):
Revision 1.8 by greg, Tue Aug 6 09:04:41 1991 UTC vs.
Revision 1.9 by greg, Wed Aug 7 08:37:27 1991 UTC

# Line 70 | Line 70 | typedef struct tline {
70                                          /* followed by the string */
71   }  TLINE;
72  
73 < #define  TLSTR(l)       ((char *)(l+1))
73 > #define  TLSTR(l)       ((char *)((l)+1))
74  
75   typedef struct {
76          FVECT  right, down;             /* right and down unit vectors */
# Line 177 | Line 177 | register OBJREC  *tm;
177                                                  /* compute vectors */
178          fcross(DxR, D, R);
179          fcross(t->right, DxR, D);
180 <        d = DOT(D,D) / DOT(t->right,t->right);
180 >        d = DOT(D,D)/DOT(t->right,t->right);
181          for (i = 0; i < 3; i++)
182                  t->right[i] *= d;
183          fcross(t->down, R, DxR);
184 <        d = DOT(R,R) / DOT(t->down,t->down);
184 >        d = DOT(R,R)/DOT(t->down,t->down);
185          for (i = 0; i < 3; i++)
186                  t->down[i] *= d;
187                                                  /* get text */
# Line 238 | Line 238 | OBJREC  *m;
238          if (tp == NULL)
239                  return;
240          for (tlp = tp->tl.next; tlp != NULL; tlp = tlp->next);
241 <                free(TLSTR(tlp));
241 >                free((char *)tlp);
242          free((char *)tp);
243          m->os = NULL;
244   }
# Line 254 | Line 254 | OBJREC  *m;
254          int  col;
255          register int  lno;
256                                  /* first, compute position in text */
257 +        tp = gettext(m);
258          v[0] = p[0] - m->oargs.farg[0];
259          v[1] = p[1] - m->oargs.farg[1];
260          v[2] = p[2] - m->oargs.farg[2];
# Line 264 | Line 265 | OBJREC  *m;
265          x -= (double)col;
266          y = (lno+1) - y;
267                                  /* get the font character */
267        tp = gettext(m);
268          for (tlp = tp->tl.next; tlp != NULL; tlp = tlp->next)
269                  if (--lno < 0)
270                          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines