X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Ffix_params%2Ffix_params.ml;fp=helm%2Ffix_params%2Ffix_params.ml;h=0000000000000000000000000000000000000000;hb=e108abe5c0b4eb841c4ad332229a6c0e57e70079;hp=f1edf091a096d6c39e450bbb0c41b8971f614b85;hpb=1456c337a60f6677ee742ff7891d43fc382359a9;p=helm.git diff --git a/helm/fix_params/fix_params.ml b/helm/fix_params/fix_params.ml deleted file mode 100644 index f1edf091a..000000000 --- a/helm/fix_params/fix_params.ml +++ /dev/null @@ -1,74 +0,0 @@ -(* Copyright (C) 2000, 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://cs.unibo.it/helm/. - *) - -let read_from_stdin = ref false;; - -let uri_of_filename fn = - let uri = - Str.replace_first (Str.regexp (Str.quote Configuration.helm_dir)) "cic:" fn - in - let uri' = Str.replace_first (Str.regexp "\.xml$") "" uri in - UriManager.uri_of_string uri' -;; - -let main() = - Deannotate.expect_possible_parameters := true ; - let files = ref [] in - Arg.parse - ["-stdin", Arg.Set read_from_stdin, "Read from stdin"] - (fun x -> files := (x, uri_of_filename x) :: !files) - " -usage: experiment file ... - -List of options:"; - if !read_from_stdin then - begin - try - while true do - let l = Str.split (Str.regexp " ") (read_line ()) in - List.iter (fun x -> files := (x, uri_of_filename x) :: !files) l - done - with - End_of_file -> () - end ; - files := List.rev !files; - Getter.update () ; - print_endline "ATTENTION: have you changed servers.txt so that you'll try \ - to repair your own objs instead of others'?" ; - flush stdout ; - List.iter - (function (fn, uri) -> - print_string (UriManager.string_of_uri uri) ; - flush stdout ; - (try - CicFindParameters.fix_params uri (Some fn) - with - e -> print_newline () ; flush stdout ; raise e ) ; - print_endline " OK!" ; - flush stdout - ) !files -;; - -main();;