X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fcomponents%2Fbinaries%2Fprobe%2Fengine.ml;h=c25201508f8a3660a47251f23fea353f2afc5899;hb=50a9ed8c6207145fccf59e6a5dbbff935cd2c6d7;hp=5117f57fcde29a4b93073eaad0a0e3c44aee6197;hpb=8ff4315142253a1a0478b67c07dddf70c36f50cd;p=helm.git diff --git a/matita/components/binaries/probe/engine.ml b/matita/components/binaries/probe/engine.ml index 5117f57fc..c25201508 100644 --- a/matita/components/binaries/probe/engine.ml +++ b/matita/components/binaries/probe/engine.ml @@ -18,14 +18,16 @@ module US = U.UriSet module B = Librarian module H = HExtlib +module M = MacLexer + let unsupported protocol = failwith (P.sprintf "probe: unsupported protocol: %s" protocol) let missing path = failwith (P.sprintf "probe: missing path: %s" path) -let unrooted path = - failwith (P.sprintf "probe: missing root: %s" path) +let unrooted path roots = + failwith (P.sprintf "probe: missing root: %s (found roots: %u)" path (L.length roots)) let out_int i = P.printf "%u\n" i @@ -50,8 +52,14 @@ let get_uri str = | [root] -> let buri = L.assoc "baseuri" (B.load_root_file root) in F.concat bdir file, F.concat buri file - | _ -> - if bdir = F.current_dir_name || bdir = F.dir_sep then unrooted dir else + | roots -> + if bdir = F.current_dir_name || bdir = F.dir_sep then unrooted dir roots else aux (F.dirname bdir) (F.concat (F.basename bdir) file) in aux dir file + +let mac fname = + let ich = open_in fname in + let lexbuf = Lexing.from_channel ich in + M.token lexbuf; close_in ich +