]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita.ml
some properties of NLE
[helm.git] / matita / matita.ml
index 1645184264b6e446f35b196da1aae353daa7b1df..6e9fa5f2395c2b3cec668f3b78bacbc0d7b1ad02 100644 (file)
@@ -32,7 +32,14 @@ open GrafiteTypes
 
 (** {2 Initialization} *)
 
-let _ = MatitaInit.initialize_all ()
+let _ = 
+  MatitaInit.add_cmdline_spec
+    ["-tptppath",Arg.String 
+      (fun s -> Helm_registry.set_string "matita.tptppath" s),
+      "Where to find the Axioms/ and Problems/ directory"];
+  MatitaInit.initialize_all ()
+;;
+
 (* let _ = Saturation.init () (* ALB to link paramodulation *) *)
 
 (** {2 GUI callbacks} *)
@@ -252,6 +259,18 @@ let _ =
   end;
   try
     GtkThread.main ()
-  with Sys.Break -> ()
+  with Sys.Break ->
+   Sys.set_signal Sys.sigint
+    (Sys.Signal_handle
+      (fun _ ->
+        prerr_endline "Still cleaning the library: don't be impatient!"));
+   prerr_endline "Matita is cleaning up. Please wait.";
+   try
+    let baseuri =
+     GrafiteTypes.get_string_option
+      (MatitaScript.current ())#grafite_status "baseuri"
+    in
+     LibraryClean.clean_baseuris [baseuri]
+   with GrafiteTypes.Option_error _ -> ()
 
 (* vim:set foldmethod=marker: *)