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

Comparing ray/src/common/font.c (file contents):
Revision 2.5 by greg, Mon Sep 21 12:02:03 1992 UTC vs.
Revision 2.7 by greg, Fri May 14 11:30:17 1993 UTC

# Line 124 | Line 124 | memerr:
124   }
125  
126  
127 + freefont(fname)                 /* free a font (free all if fname==NULL) */
128 + char  *fname;
129 + {
130 +        FONT  head;
131 +        register FONT  *fl, *f;
132 +        register int  i;
133 +
134 +        head.next = fontlist;
135 +        fl = &head;
136 +        while ((f = fl->next) != NULL)
137 +                if (fname == NULL || !strcmp(fname, f->name)) {
138 +                        fl->next = f->next;
139 +                        for (i = 0; i < 256; i++)
140 +                                if (f->fg[i] != NULL)
141 +                                        free((char *)f->fg[i]);
142 +                        freestr(f->name);
143 +                        free((char *)f);
144 +                } else
145 +                        fl = f;
146 +        fontlist = head.next;
147 + }
148 +
149 +
150   int
151   uniftext(sp, tp, f)                     /* uniformly space text line */
152   register short  *sp;            /* returned character spacing */
# Line 191 | Line 214 | int  nsi;                      /* minimum number of spaces for indent */
214                                          /* start by squeezing it */
215          squeeztext(sp, tp, f, cis);
216                                          /* now, realign spacing */
217 <        len = 0;
195 <        width = alen = *sp++;
217 >        width = *sp++;
218          while (*tp) {
219 +                len = alen = 0;
220                  nsp = sp;
221                  for (end = tp; *end; end = tab) {
222                          tab = end + 1;
# Line 217 | Line 240 | int  nsi;                      /* minimum number of spaces for indent */
240                          *sp++ += alen;
241                          len -= alen;
242                  }
220                len = 0;
221                alen = 0;
243                  tp = tab;
244          }
245          return(width);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines