]> matita.cs.unibo.it Git - helm.git/commitdiff
- updated META dependencies (no more dbm, no more shell)
authorStefano Zacchiroli <zack@upsilon.cc>
Wed, 6 Jul 2005 15:49:32 +0000 (15:49 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Wed, 6 Jul 2005 15:49:32 +0000 (15:49 +0000)
- removed module Http_getter_map

helm/ocaml/METAS/meta.helm-getter.src
helm/ocaml/getter/Makefile
helm/ocaml/getter/http_getter_map.ml [deleted file]
helm/ocaml/getter/http_getter_map.mli [deleted file]

index cb6d0a0e9f799ada0d5f6adeab3aa92c23ed0eaa..8a7badf7476d440211637a49dba4fc51c0dbc434 100644 (file)
@@ -1,4 +1,4 @@
-requires="http dbm pcre shell zip helm-xml helm-logger helm-thread helm-urimanager helm-registry"
+requires="http unix pcre zip helm-xml helm-logger helm-urimanager helm-registry"
 version="0.0.1"
 archive(byte)="getter.cma"
 archive(native)="getter.cmxa"
index 8732c11ff2467015328f09ab3731820f59f1a61a..c6450d17814c145ffb20997bcaae2a59e64d668b 100644 (file)
@@ -2,8 +2,8 @@
 PACKAGE = getter
 
 REQUIRES = \
-       http dbm pcre shell zip \
-       helm-xml helm-thread helm-logger helm-urimanager helm-registry
+       http unix pcre zip \
+       helm-xml helm-logger helm-urimanager helm-registry
 
 INTERFACE_FILES =              \
        http_getter_wget.mli    \
@@ -13,7 +13,6 @@ INTERFACE_FILES =             \
        http_getter_env.mli     \
        http_getter_storage.mli \
        http_getter_common.mli  \
-       http_getter_map.mli     \
        http_getter.mli         \
        $(NULL)
 
diff --git a/helm/ocaml/getter/http_getter_map.ml b/helm/ocaml/getter/http_getter_map.ml
deleted file mode 100644 (file)
index 7c411d8..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-(*
- * Copyright (C) 2003-2004:
- *    Stefano Zacchiroli <zack@cs.unibo.it>
- *    for the HELM Team http://helm.cs.unibo.it/
- *
- *  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/
- *)
-
-open Http_getter_types
-
-class map dbname =
-  let perm = 420 in (* permission 644 in decimal notation *)
-  let open_dbm () =
-    Http_getter_misc.mkdir ~parents:true (Filename.dirname dbname);
-    Dbm.opendbm dbname [ Dbm.Dbm_rdwr; Dbm.Dbm_create ] perm
-  in
-  
-  object (self)
-
-    inherit ThreadSafe.threadSafe
-
-    val mutable db = open_dbm ()
-    val index_RE = Pcre.regexp "^theory:/.*/index.theory$"
-
-    (*initializer Gc.finalise Dbm.close db  (* close db on GC *)*)
-
-    (* Backward compatibility code to map
-       theory:/path/t.theory into theory:/path/t/index.theory
-       when cic:/path/t/ exists *)
-    method private normalize_key key =
-     if Pcre.pmatch ~rex:index_RE key &&
-        (try ignore (Dbm.find db key); false with Not_found -> true)
-     then
-      (* we substitute /index.theory with .theory *)
-      String.sub key 0 (String.length key - 13) ^ ".theory"
-     else key
-
-    method add key value =
-      self#doWriter (lazy (
-        try
-          Dbm.add db key value
-        with Dbm.Dbm_error "Entry already exists" -> raise (Key_already_in key)
-      ))
-
-    method replace key value =
-      self#doWriter (lazy (
-        Dbm.replace db key value
-      ))
-
-    method remove key =
-      self#doWriter (lazy (
-        try
-          Dbm.remove db key
-        with Dbm.Dbm_error "dbm_delete" -> raise (Key_not_found key)
-      ))
-
-    method resolve key =
-      self#doReader (lazy (
-        try
-         Dbm.find db (self#normalize_key key)
-        with Not_found -> raise (Key_not_found key)
-      ))
-
-    method iter (f: string -> string -> unit) =
-      self#doReader (lazy (
-        Dbm.iter f db
-      ))
-
-    method sync =
-      self#doWriter (lazy (
-        Dbm.close db;
-        db <- open_dbm ()
-      ))
-
-    method clear =
-      self#doWriter (lazy (
-        Dbm.close db;
-        List.iter
-          (fun ext ->
-            let file = dbname ^ ext in
-            if Sys.file_exists file then Sys.remove file)
-          [".dir"; ".pag"; ".db"];
-        db <- open_dbm ()
-      ))
-
-    method close =
-      self#doWriter (lazy (
-        Dbm.close db
-      ))
-
-  end
-
diff --git a/helm/ocaml/getter/http_getter_map.mli b/helm/ocaml/getter/http_getter_map.mli
deleted file mode 100644 (file)
index 3e4ac7b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-(*
- * Copyright (C) 2003-2004:
- *    Stefano Zacchiroli <zack@cs.unibo.it>
- *    for the HELM Team http://helm.cs.unibo.it/
- *
- *  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/
- *)
-
-class map:
-  string ->
-    object
-      method add: string -> string -> unit
-      method replace: string -> string -> unit
-      method remove: string -> unit
-      method resolve: string -> string
-      method iter: (string -> string -> unit) -> unit
-      method sync: unit
-      method clear: unit
-
-      method close: unit (* use with caution! *)
-    end