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.9 by greg, Sun Nov 22 11:46:46 1992 UTC vs.
Revision 2.10 by greg, Sun Nov 22 17:54:00 1992 UTC

# Line 142 | Line 142 | char  *s;
142          if ((tl=(TLINE *)malloc(sizeof(TLINE)+siz)) == NULL ||
143                          (tl->spc=(short *)malloc(siz*sizeof(short))) == NULL)
144                  error(SYSTEM, "out of memory in tlalloc");
145        tl->spc = NULL;
145          tl->next = NULL;
146          strcpy(TLSTR(tl), s);
147          return(tl);
# Line 171 | Line 170 | register OBJREC  *tm;
170          if (tm->oargs.nsargs - tndx(tm) < 1 || tm->oargs.nfargs < sndx(tm))
171                  objerror(tm, USER, "bad # arguments");
172          if ((t = (TEXT *)malloc(sizeof(TEXT))) == NULL)
173 <                goto memerr;
173 >                error(SYSTEM, "out of memory in gettext");
174                                                  /* compute vectors */
175          fcross(DxR, D, R);
176          fcross(t->right, DxR, D);
# Line 223 | Line 222 | register OBJREC  *tm;
222          i = d * 256.0;
223          t->tl.width = 0;
224          for (tlp = t->tl.next; tlp != NULL; tlp = tlp->next) {
226                if ((tlp->spc = (short *)malloc(
227                                (strlen(TLSTR(tlp))+1)*sizeof(short))) == NULL)
228                        goto memerr;
225                  if (i < 0)
226                          tlp->width = squeeztext(tlp->spc, TLSTR(tlp), t->f, -i);
227                  else if (i > 0)
# Line 238 | Line 234 | register OBJREC  *tm;
234                                                  /* we're done */
235          tm->os = (char *)t;
236          return(t);
241 memerr:
242        error(SYSTEM, "out of memory in gettext");
237   #undef  R
238   #undef  D
239   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines