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 = [
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 =