-module HGT = Http_getter_types;;
-module HG = Http_getter;;
-module UM = UriManager;;
-module TA = TacticAst;;
-
-let _ =
- Helm_registry.load_from "matita.conf.xml";
- HG.init ();
- MetadataTypes.ownerize_tables (Helm_registry.get "matita.owner")
-
-let clean_all () =
- MatitaDb.clean_owner_environment ();
- MatitaDb.create_owner_environment ();
- exit 0
-
-let dbd = MatitaDb.instance ()
-let cache_of_processed_baseuri = Hashtbl.create 1024
-
-let one_step_depend suri =
- let buri =
- try
- UM.buri_of_uri (UM.uri_of_string suri)
- with UM.IllFormedUri _ -> suri
- in
- if Hashtbl.mem cache_of_processed_baseuri buri then
- []
- else
- begin
- Hashtbl.add cache_of_processed_baseuri buri true;
- let query =
- let buri = buri ^ "/" in
- let buri = Mysql.escape buri in
- let obj_tbl = MetadataTypes.obj_tbl () in
- Printf.sprintf
- "SELECT source FROM %s WHERE h_occurrence LIKE '%s%%'" obj_tbl buri
- in
- try
- let rc = Mysql.exec dbd query in
- let l = ref [] in
- Mysql.iter rc (fun a -> match a.(0) with None ->()|Some a -> l:=a:: !l);
- let l = List.sort Pervasives.compare !l in
- MatitaMisc.list_uniq l
- with
- exn -> raise exn (* no errors should be accepted *)
- end
-
-
-let safe_buri_of_suri suri =
- try
- UM.buri_of_uri (UM.uri_of_string suri)
- with
- UM.IllFormedUri _ -> suri
+(* Copyright (C) 2005, HELM Team.
+ *
+ * This file is part of HELM, an Hypertextual, Electronic
+ * Library of Mathematics, developed at the Computer Science
+ * Department, University of Bologna, Italy.
+ *
+ * HELM is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * HELM is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HELM; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ *
+ * For details, see the HELM World-Wide-Web page,
+ * http://helm.cs.unibo.it/
+ *)