]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/binaries/xoa/lib.ml
update in ground
[helm.git] / matita / components / binaries / xoa / lib.ml
index ec9ec81d2910ad1c57e15e2d7413411892ef7176..f2bf31757a88a9887d1f13a167d5b3ddd004b129 100644 (file)
@@ -30,9 +30,15 @@ let copy_preamble preamble och =
    in
    try read () with End_of_file -> close_in ich
 
+let print_header def och =
+  let msg = if def then "LOGIC" else "GROUND NOTATION" in
+   let stars = String.make (72 - String.length msg) '*' in
+   Printf.fprintf och "(* %s %s*)\n\n" msg stars
+
 let print_comment och =
-   let stars = String.make (30 - String.length myself) '*' in
-   Printf.fprintf och "(* This file was generated by %s: do not edit %s*)\n\n" myself stars
+   let msg = Printf.sprintf "NOTE: This file was generated by %s, do not edit" myself in
+   let stars = String.make (72 - String.length msg) '*' in
+   Printf.fprintf och "(* %s %s*)\n\n" msg stars
 
 let exists_out name =
    let path = [
@@ -42,14 +48,16 @@ let exists_out name =
    let name = List.fold_left F.concat "" path in
    K.file_exists (name ^ ".ma")
 
-let open_out preamble name =
+let open_out def preamble name =
    let path = [
       R.get_string "xoa.output_dir";
       name
    ] in
    let name = List.fold_left F.concat "" path in
    let och = open_out (name ^ ".ma") in
-   copy_preamble preamble och; print_comment och;
+   copy_preamble preamble och;
+   print_header def och;
+   print_comment och;
    och
 
 let out_include och s =