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");
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to