From ff859848541b87c98e7dc96e610fa65a1d52dbbb Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Wed, 18 Feb 2004 13:17:52 +0000 Subject: [PATCH] now mathql interpreter use helm registry --- helm/ocaml/mathql_interpreter/mQIMap.ml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/helm/ocaml/mathql_interpreter/mQIMap.ml b/helm/ocaml/mathql_interpreter/mQIMap.ml index 341ebd310..b215f366f 100644 --- a/helm/ocaml/mathql_interpreter/mQIMap.ml +++ b/helm/ocaml/mathql_interpreter/mQIMap.ml @@ -34,16 +34,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 +54,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 -- 2.39.2