(* camlp4r ./pa_html.cmo *) (* $Id: mergeFam.ml,v 4.9 2004/12/14 09:30:14 ddr Exp $ *) (* Copyright (c) 1998-2005 INRIA *) open Config; open Def; open Util; open Gutil; value need_differences_selection conf base fam1 fam2 = let need_selection proj = let x1 = proj fam1 in let x2 = proj fam2 in x1 <> "" && x2 <> "" && x1 <> x2 in need_selection (fun fam -> match fam.relation with [ Married -> "married" | NotMarried -> "not married" | Engaged -> "engaged" | NoSexesCheck -> "no sexes check" | NoMention -> "no mention" ]) || need_selection (fun fam -> match Adef.od_of_codate fam.marriage with [ None -> "" | Some d -> Date.string_of_ondate conf d ]) || need_selection (fun fam -> sou base fam.marriage_place) || need_selection (fun fam -> match fam.divorce with [ NotDivorced -> "not divorced" | Separated -> "separated" | Divorced cod -> match Adef.od_of_codate cod with [ Some d -> Date.string_of_ondate conf d | None -> "divorced" ] ]) ; value print_differences conf base branches fam1 fam2 = let string_field title name proj = let x1 = proj fam1 in let x2 = proj fam2 in if x1 <> "" && x2 <> "" && x1 <> x2 then do { Wserver.wprint "