From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id FAA07969; Mon, 14 Jul 2003 05:38:19 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA30360 for ; Mon, 14 Jul 2003 05:38:18 +0200 (MET DST) Received: from mz1.forethought.net (mzpi3.forethought.net [216.241.36.12]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h6E3cHT01569 for ; Mon, 14 Jul 2003 05:38:17 +0200 (MET DST) Received: from [216.241.35.41] (helo=swordfish) by mz1.forethought.net with esmtp (Exim 4.14) id 19buAK-0008Vp-1z for caml-list@pauillac.inria.fr; Sun, 13 Jul 2003 21:38:16 -0600 Received: from matt by swordfish with local (Exim 3.35 #1 (Debian)) id 19buAP-00070E-00 for ; Sun, 13 Jul 2003 21:38:21 -0600 Date: Sun, 13 Jul 2003 21:38:21 -0600 From: Matt Gushee To: caml-list@pauillac.inria.fr Subject: [Caml-list] Strange error w/ Mlgraph.make_font Message-ID: <20030714033820.GI4031@swordfish> Reply-To: Matt Gushee Mail-Followup-To: caml-list@pauillac.inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; gushee:01 mgushee:01 havenrock:01 font:99 bash-:01 2.05:01 3.06:01 helvetica:99 string':01 semicolons:01 bug:01 englewood:01 manure:01 ignores:01 --lao:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I have been doing some work with Mlgraph lately, and have noticed a problem with the make_font function: bash-2.05a$ ocaml mlgraph.cma Objective Caml version 3.06 # open Mlgraph;; # let f = make_font Helvetica 12.;; Exception: Failure "float_of_string". This happens with proportional fonts (Helvetica, Times, and Symbol), but not for fixed-width fonts (Courier). I tracked down the cause today: it's because the function that loads the font definition files is attempting to apply 'float_of_string' to lines ending in semicolons. So, for my own installation, I've added a 'strip_semicolon' function to 'fonts.ml'. However, I am planning to distribute a software package that may depend on MLgraph, so I'd like to make a patch available for this error. But I'm wondering if my fix is really the right solution. What's strange about this is that it's almost certain that anyone who tried to use MLgraph would have discovered this bug a long time ago, so I can only think that, once upon a time, it wasn't a bug, but something outside of Mlgraph changed to cause the error. For example: Older versions of Ghostscript didn't add semicolons to the ends of the problematic lines; or Older versions of OCaml had a float_of_string function that ignored trailing semicolons. Anybody know what the real reason might be? While I'm at it, are the MLgraph developers still around? Would they (you) be interested in accepting patches? -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners