X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fbinaries%2Fprobe%2Fprobe.ml;h=55b942cc10a2552bd5b2114f63c7ce4fdd7ac3ed;hb=bec531b57a008238f67cd72edc751844d28b374f;hp=fb7b4eab9915c99788739210fcc676dea55edf5a;hpb=243d091f23f8338e155cdde14969a6043b8c89af;p=helm.git diff --git a/matita/components/binaries/probe/probe.ml b/matita/components/binaries/probe/probe.ml index fb7b4eab9..55b942cc1 100644 --- a/matita/components/binaries/probe/probe.ml +++ b/matita/components/binaries/probe/probe.ml @@ -19,6 +19,7 @@ module H = HLog module O = Options module M = MatitaList +module D = MatitaRemove module S = NCicScan module E = Engine @@ -28,9 +29,12 @@ let no_log _ _ = () let init registry = R.load_from registry; - B.init (); - C.set_trust trusted; - H.set_log_callback no_log + if !O.no_init then begin + B.init (); + C.set_trust trusted; + H.set_log_callback no_log; + O.no_init := false; + end let scan_uri devel str = M.from_string (R.get "matita.basedir") devel str; @@ -59,9 +63,12 @@ let process s = else if E.is_registry s then init s else scan_from s +let clear () = + D.objects (); O.clear () + let _ = let help = "Usage: probe [ -X | | -gp | HELM (base)uri | -i | -on | os | -sn | -ss ]*" in - let help_X = " Reset options and counters" in + let help_X = " Clear configuration, options and counters" in let help_g = " Exclude generated objects" in let help_i = " Print the total intrinsic size" in let help_p = " Exclude provided objects" in @@ -70,7 +77,7 @@ let _ = let help_sn = " Print the number of sources" in let help_ss = " Print the list of sources" in A.parse [ - "-X" , A.Unit O.clear, help_X; + "-X" , A.Unit clear, help_X; "-g" , A.Unit set_g, help_g; "-i" , A.Unit out_i, help_i; "-on", A.Unit out_on, help_on; @@ -78,4 +85,5 @@ let _ = "-p" , A.Unit set_p, help_p; "-sn", A.Unit out_sn, help_sn; "-ss", A.Unit out_ss, help_ss; - ] process help + ] process help; + D.objects ()