Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2014 19:38:45 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267126 - head/tools/tools/vt/fontcvt
Message-ID:  <201406051938.s55Jcj1h042956@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Thu Jun  5 19:38:44 2014
New Revision: 267126
URL: http://svnweb.freebsd.org/changeset/base/267126

Log:
  vt fontcvt: Accept space after BITMAP in .bdf parser
  
  The Unifont BDF generator incorrectly adds a space after BITMAP, and
  and that error has been widely propagated.

Modified:
  head/tools/tools/vt/fontcvt/fontcvt.c

Modified: head/tools/tools/vt/fontcvt/fontcvt.c
==============================================================================
--- head/tools/tools/vt/fontcvt/fontcvt.c	Thu Jun  5 18:59:21 2014	(r267125)
+++ head/tools/tools/vt/fontcvt/fontcvt.c	Thu Jun  5 19:38:44 2014	(r267126)
@@ -260,7 +260,8 @@ parse_bdf(FILE *fp, unsigned int map_idx
 			dwidth = atoi(ln + 7);
 		}
 
-		if (strcmp(ln, "BITMAP") == 0) {
+		if (strncmp(ln, "BITMAP", 6) == 0 &&
+		    (ln[6] == ' ' || ln[6] == '\0')) {
 			for (i = 0; i < height; i++) {
 				if ((ln = fgetln(fp, &length)) == NULL) {
 					fprintf(stderr, "Unexpected EOF!\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406051938.s55Jcj1h042956>