From 3a941f4ae2213f26118f5cfde03ca793b31ca838 Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Tue, 8 May 2012 14:52:05 +0100 Subject: Imported Upstream version 2.2.3 --- chkfont.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'chkfont.c') diff --git a/chkfont.c b/chkfont.c index 8272207..92fefad 100644 --- a/chkfont.c +++ b/chkfont.c @@ -1,6 +1,9 @@ #include #include #include +#ifdef __STDC__ +#include +#endif #define DATE "20 Feb 1996" #define VERSION "2.2" @@ -68,10 +71,9 @@ char *ptr; ptr=(char *)malloc(size); if (ptr==NULL) { fprintf(stderr,"%s: Out of memory\n",myname); + exit(1); } -else { - return(ptr); - } +return(ptr); } int badsuffix(path,suffix) @@ -103,15 +105,22 @@ fprintf(stderr,"Usage: %s fontfile ...\n",myname); exit(1); } - void readchar() { int i,expected_width,k,len,newlen,diff,l; char endmark,expected_endmark; int leadblanks,minleadblanks,trailblanks,mintrailblanks; +char *ret; +expected_width = expected_endmark = 0; /* prevent compiler warning */ for (i=0;i