-$Id: TODO,v 1.4 2008-04-25 12:55:39 rjones Exp $
+$Id: TODO,v 1.5 2008-05-07 14:37:00 rjones Exp $
Major to-do items.
(1) DONE - In bitmatch operator, use patterns not expressions.
(9) DONE -
Make the error locations fine-grained, particularly so they point to
individual fields, not the whole match.
+
+(10) Cross-module, persistent, named patterns, see:
+ http://caml.inria.fr/pub/ml-archives/caml-list/2008/04/25992c9c9fa999fe1d35d961dd9917a2.en.html
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id: bitmatch.ml,v 1.10 2008-04-26 20:35:02 rjones Exp $
+ * $Id: bitmatch.ml,v 1.11 2008-05-07 14:37:00 rjones Exp $
*)
open Printf
(* Add the bytes. *)
I64.map_bytes_be (Buffer._add_bits buf) (Buffer.add_byte buf) v flen
+(* Construct from a string of bytes, exact multiple of 8 bits
+ * in length of course.
+ *)
+let construct_string buf str =
+ let len = String.length str in
+ Buffer.add_bits buf str (len lsl 3)
+
(*----------------------------------------------------------------------*)
(* Extract a string from a bitstring. *)
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id: bitmatch.mli,v 1.17 2008-04-26 20:35:02 rjones Exp $
+ * $Id: bitmatch.mli,v 1.18 2008-05-07 14:37:00 rjones Exp $
*)
(**
val construct_int_be_unsigned : Buffer.t -> int -> int -> exn -> unit
val construct_int64_be_unsigned : Buffer.t -> int64 -> int -> exn -> unit
+
+val construct_string : Buffer.t -> string -> unit
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(ocaml-bitmatch,0.6)
+AC_INIT(ocaml-bitmatch,0.7)
dnl Check for basic C environment.
AC_PROG_CC