On Tue, Nov 11, 2008 at 12:47:50PM -0500, Brian J. Murrell wrote: > On Tue, 2008-11-11 at 12:08 -0500, Eric Cooper wrote: > > The fix should be simple.
> Is that a hint that I should be able to fix it myself? :-) No, that was just me daring myself to fix it soon :-) In fact, I've fixed it already; a patch is attached. The build dependencies for approx are rather extensive, but nothing that pbuilder, etc. can't handle. Let me know if you need any help. -- Eric Cooper e c c @ c m u . e d u
>From da60a6d786ed9b6e847e8abb1deeec1c14605ba3 Mon Sep 17 00:00:00 2001 From: Eric Cooper <[EMAIL PROTECTED]> Date: Tue, 11 Nov 2008 12:41:56 -0500 Subject: [PATCH] handle multiple blank lines between paragraphs in control files --- control_file.ml | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/control_file.ml b/control_file.ml index 90b8e89..3dbae7e 100644 --- a/control_file.ml +++ b/control_file.ml @@ -45,18 +45,24 @@ let read_paragraph chan = with End_of_file -> None in match next with - | None when lines = [] -> raise End_of_file - | None | Some "" -> lines - | Some line when line.[0] = ' ' || line.[0] = '\t' -> - (match lines with - | last :: others -> - let line = - if line = " ." then "" - else substring line ~from: 1 - in - loop ((last ^ "\n" ^ line) :: others) - | [] -> failwith ("leading white space: " ^ line)) - | Some line -> loop (line :: lines) + | None -> + if lines <> [] then lines + else raise End_of_file + | Some "" -> + if lines <> [] then lines + else loop [] + | Some line -> + if line.[0] = ' ' || line.[0] = '\t' then + match lines with + | last :: others -> + let line = + if line = " ." then "" + else substring line ~from: 1 + in + loop ((last ^ "\n" ^ line) :: others) + | [] -> failwith ("leading white space: " ^ line) + else + loop (line :: lines) in List.rev_map parse (loop []) -- 1.5.6.5