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.16 by schorsch, Sun Jul 27 22:12:01 2003 UTC vs.
Revision 2.20 by greg, Tue Mar 22 03:56:17 2016 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 < #include "standard.h"
10 > #include <stdlib.h>
11  
12 + #include "paths.h"
13 + #include "rtio.h"
14 + #include "rterror.h"
15   #include "font.h"
16  
17   #define galloc(nv)      (GLYPH *)malloc(sizeof(GLYPH)+2*sizeof(GORD)*(nv))
# Line 24 | Line 27 | getfont(fname)                         /* return font fname */
27   char  *fname;
28   {
29          FILE  *fp;
30 <        char  *pathname, *err;
30 >        char  *pathname, *err = NULL;
31          unsigned  wsum, hsum, ngly;
32          int  gn, ngv, gv;
33          register GLYPH  *g;
# Line 39 | Line 42 | char  *fname;
42                                                  /* load the font file */
43          if ((pathname = getpath(fname, getrlibpath(), R_OK)) == NULL) {
44                  sprintf(errmsg, "cannot find font file \"%s\"", fname);
45 <                error(USER, errmsg);
45 >                error(SYSTEM, errmsg);
46          }
47          f = (FONT *)calloc(1, sizeof(FONT));
48          if (f == NULL)
# Line 208 | Line 211 | FONT  *f;                      /* font */
211   int  cis;                       /* target intercharacter spacing */
212   int  nsi;                       /* minimum number of spaces for indent */
213   {
214 <        register char  *end, *tab;
214 >        register char  *end, *tab = NULL;
215          GLYPH  *gp;
216          short  *nsp;
217          int  alen, len, width;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines