hlfw.ca

x9dev

Download patch

ref: b053b696b51633eae83b8a8a42baa283f54428fe
parent: 628dbef470f318d598ffc0b1eca50c4f4986997c
author: halfwit <michaelmisch1985@gmail.com>
date: Thu Oct 15 09:08:51 PDT 2020

Clean up new includes

--- a/libdraw/buildfont.c
+++ b/libdraw/buildfont.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
 #include "draw.h"
 
 static char*
@@ -43,7 +44,6 @@
 	fnt->ascent = strtol(s, &s, 0);
 	s = skip(s);
 	if(fnt->height<=0 || fnt->ascent<=0){
-		werrstr("bad height or ascent in font file");
 		goto Err2;
 	}
 	fnt->width = 0;
@@ -56,7 +56,6 @@
 	do{
 		/* must be looking at a number now */
 		if(*s<'0' || '9'<*s){
-			werrstr(badform, s-buf);
 			goto Err3;
 		}
 		min = strtol(s, &s, 0);
@@ -63,13 +62,11 @@
 		s = skip(s);
 		/* must be looking at a number now */
 		if(*s<'0' || '9'<*s){
-			werrstr(badform, s-buf);
 			goto Err3;
 		}
 		max = strtol(s, &s, 0);
 		s = skip(s);
 		if(*s==0 || min>Runemax || max>Runemax || min>max){
-			werrstr("illegal subfont range");
     Err3:
 			freefont(fnt);
 			return 0;
--- a/libdraw/openfont.c
+++ b/libdraw/openfont.c
@@ -1,4 +1,5 @@
 #include <unistd.h>
+#include <stdlib.h>
 #include <fcntl.h>
 #include "draw.h"
 
@@ -38,7 +39,6 @@
 	char *buf;
 
 	if((buf = readfile(name)) == nil){
-		werrstr("openfont: %r");
 		return nil;
 	}
 	fnt = buildfont(d, buf, name);