X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Fmathql_interpreter%2FmQIMap.ml;h=a5b6654c88aeee7309ba58806b3924fe3c56a5bc;hb=a7063fc0997a9d9eae6c329443e67ab92c4b6a0f;hp=341ebd310490802e786991c7082d2d1b48207aca;hpb=4b51f08281103ec8a4b6c66047a530a1d11071d0;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQIMap.ml b/helm/ocaml/mathql_interpreter/mQIMap.ml index 341ebd310..a5b6654c8 100644 --- a/helm/ocaml/mathql_interpreter/mQIMap.ml +++ b/helm/ocaml/mathql_interpreter/mQIMap.ml @@ -26,6 +26,8 @@ (* AUTOR: Ferruccio Guidi *) +(* $Id$ *) + module U = MQueryUtil type pg_map = (MathQL.path * (bool * string * string option)) list @@ -34,16 +36,11 @@ type pg_tables = (bool * string) list type pg_alias = (string * string) list -let empty_map () = "", [], [] +let empty_map () = [], [] let read_map () = - let default_map = "mathql_db_map.txt" in - let map = - try Sys.getenv "MATHQL_DB_MAP" - with Not_found -> default_map - in + let map = Helm_registry.get "mathql_interpreter.db_map" in let ich = open_in map in - let pgs = input_line ich in let rec aux r s = let d = input_line ich in match Str.split (Str.regexp "[ \t]+") d with @@ -59,7 +56,7 @@ let read_map () = in let pgm, pga = aux [] [] in close_in ich; - pgs, pgm, pga + pgm, pga let comp c1 c2 = match c1, c2 with | (_, t1), (_, t2) when t1 < t2 -> U.Lt