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 2.25 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.26 by greg, Tue Jul 8 18:25:00 2014 UTC

# Line 82 | Line 82 | static int intext(FVECT p, OBJREC *m);
82   static int inglyph(double x, double y, GLYPH *gl);
83  
84  
85 < extern int
85 > int
86   do_text(
87 <        register OBJREC  *m,
87 >        OBJREC  *m,
88          RAY  *r
89   )
90   {
# Line 138 | Line 138 | tlalloc(                       /* allocate and assign text line */
138          char  *s
139   )
140   {
141 <        register int  siz;
142 <        register TLINE  *tl;
141 >        int  siz;
142 >        TLINE  *tl;
143  
144          siz = strlen(s) + 1;
145          if ((tl=(TLINE *)malloc(sizeof(TLINE)+siz)) == NULL ||
# Line 153 | Line 153 | tlalloc(                       /* allocate and assign text line */
153  
154   static TEXT *
155   gettext(                        /* get text structure for material */
156 <        register OBJREC  *tm
156 >        OBJREC  *tm
157   )
158   {
159   #define  R      (tm->oargs.farg+3)
# Line 163 | Line 163 | gettext(                       /* get text structure for material */
163          FILE  *fp;
164          char  linbuf[512];
165          TEXT  *t;
166 <        register int  i;
167 <        register TLINE  *tlp;
168 <        register char  *s;
166 >        int  i;
167 >        TLINE  *tlp;
168 >        char  *s;
169  
170          if ((t = (TEXT *)tm->os) != NULL)
171                  return(t);
# Line 245 | Line 245 | gettext(                       /* get text structure for material */
245   }
246  
247  
248 < extern void
248 > void
249   freetext(                       /* free text structures associated with m */
250          OBJREC  *m
251   )
252   {
253 <        register TEXT  *tp;
254 <        register TLINE  *tlp;
253 >        TEXT  *tp;
254 >        TLINE  *tlp;
255  
256          tp = (TEXT *)m->os;
257          if (tp == NULL)
# Line 273 | Line 273 | intext(                        /* check to see if p is in text glyph */
273          OBJREC  *m
274   )
275   {
276 <        register TEXT  *tp;
277 <        register TLINE  *tlp;
276 >        TEXT  *tp;
277 >        TLINE  *tlp;
278          FVECT  v;
279          double  y, x;
280 <        register int  i, h;
280 >        int  i, h;
281                                  /* first, compute position in text */
282          tp = gettext(m);
283          v[0] = p[0] - m->oargs.farg[0];
# Line 313 | Line 313 | static int
313   inglyph(                /* (x,y) within font glyph gl? */
314          double  x,              /* real coordinates in range [0,255) */
315          double  y,
316 <        register GLYPH  *gl
316 >        GLYPH  *gl
317   )
318   {
319          int  n, ncross;
320          int  xlb, ylb;
321          int  tv;
322 <        register GORD  *p0, *p1;
322 >        GORD  *p0, *p1;
323  
324          if (gl == NULL)
325                  return(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines