aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorvgross2010-05-31 22:22:13 +0000
committervgross2010-05-31 22:22:13 +0000
commitaadff10ea8da78a9acc76a3dc595e47cfa5b72cf (patch)
tree7d8c76cee2e5def64e7f856c3620ee9ac35bc37b /lib
parent8e87953db0d1d0a96ed1517e38a25d08092ffad3 (diff)
CoqIDE goes multiprocess
This commit changes many things in CoqIDE, and several breakage are to be expected. So far, evaluation in standard tactic mode and backtracking seems to be working. Future work : - clean up the thread management crud remaining in ide/coqide.ml - rework the exception handling - rework the init system in Coqtop plus many other things git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13043 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.mllib1
-rw-r--r--lib/safe_marshal.ml11
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/lib.mllib b/lib/lib.mllib
index 86d29c4be6..b5db04d213 100644
--- a/lib/lib.mllib
+++ b/lib/lib.mllib
@@ -25,3 +25,4 @@ Heap
Option
Dnet
Store
+Safe_marshal
diff --git a/lib/safe_marshal.ml b/lib/safe_marshal.ml
index e9ba81b499..0ae5245d7f 100644
--- a/lib/safe_marshal.ml
+++ b/lib/safe_marshal.ml
@@ -5,6 +5,15 @@
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
+(*
+let uuencode s =
+ let norm_s = s ^ (String.make (String.length s mod 3) '\000') in
+ let rec y f x = f (y f) x in
+ let chop rem = function
+ | "" -> []
+ | s -> String.sub s 0 3 :: (rem (String.sub s 3 (String.length (s - 3)))) in
+ let chunks = y chop norm_s in
+ *)
let hobcnv = Array.init 256 (fun i -> Printf.sprintf "%.2x" i)
let bohcnv = Array.init 256 (fun i -> i -
@@ -13,7 +22,7 @@ let bohcnv = Array.init 256 (fun i -> i -
(if 0x61 <= i then 0x20 else 0))
let hex_of_bin ch = hobcnv.(int_of_char ch)
-let bin_of_hex s = bohcnv.(char_of_int s[0]) * 16 + bohcnv.(char_of_int s[1])
+let bin_of_hex s = char_of_int (bohcnv.(int_of_char s.[0]) * 16 + bohcnv.(int_of_char s.[1]))
let send cout expr =
let mshl_expr = Marshal.to_string expr [] in