From owner-svn-src-head@FreeBSD.ORG Tue Jun 3 17:54:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B6F1603; Tue, 3 Jun 2014 17:54:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D38251A; Tue, 3 Jun 2014 17:54:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53HsIbs095684; Tue, 3 Jun 2014 17:54:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53HsIsI095683; Tue, 3 Jun 2014 17:54:18 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201406031754.s53HsIsI095683@svn.freebsd.org> From: Ed Maste Date: Tue, 3 Jun 2014 17:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267012 - head/tools/tools/vt/fontcvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2014 17:54:19 -0000 Author: emaste Date: Tue Jun 3 17:54:18 2014 New Revision: 267012 URL: http://svnweb.freebsd.org/changeset/base/267012 Log: vt fontcvt: Make the bold font optional Sponsored by: The FreeBSD Foundation Modified: head/tools/tools/vt/fontcvt/fontcvt.c Modified: head/tools/tools/vt/fontcvt/fontcvt.c ============================================================================== --- head/tools/tools/vt/fontcvt/fontcvt.c Tue Jun 3 17:53:11 2014 (r267011) +++ head/tools/tools/vt/fontcvt/fontcvt.c Tue Jun 3 17:54:18 2014 (r267012) @@ -84,7 +84,7 @@ usage(void) { fprintf(stderr, -"usage: fontcvt [-w width] [-h height] normal.bdf bold.bdf out.fnt\n"); +"usage: fontcvt [-w width] [-h height] normal.bdf [bold.bdf] out.fnt\n"); exit(1); } @@ -406,21 +406,27 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (argc != 3) + if (argc < 2 || argc > 3) usage(); wbytes = howmany(width, 8); if (parse_bdf(argv[0], VFNT_MAP_NORMAL) != 0) return (1); - if (parse_bdf(argv[1], VFNT_MAP_BOLD) != 0) - return (1); + argc--; + argv++; + if (argc == 2) { + if (parse_bdf(argv[0], VFNT_MAP_BOLD) != 0) + return (1); + argc--; + argv++; + } number_glyphs(); fold_mappings(0); fold_mappings(1); fold_mappings(2); fold_mappings(3); - if (write_fnt(argv[2]) != 0) + if (write_fnt(argv[0]) != 0) return (1); printf(