Change bitmatch -> bitstring
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 17 Jul 2008 16:51:56 +0000 (17:51 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 17 Jul 2008 16:51:56 +0000 (17:51 +0100)
Makefile.in
configure.ac
diskzip/Makefile.in
diskzip/diskzip.ml
lib/META.in
lib/Makefile.in
lib/README
lib/diskimage.mli
lib/diskimage_impl.mli
lib/diskimage_ntfs.ml
virt-df/Makefile.in

index f9f2a51..d21bce8 100644 (file)
@@ -22,7 +22,7 @@ VERSION               = @PACKAGE_VERSION@
 INSTALL                = @INSTALL@
 
 OCAMLDOC        = @OCAMLDOC@
 INSTALL                = @INSTALL@
 
 OCAMLDOC        = @OCAMLDOC@
-OCAMLDOCFLAGS  += -html -sort -package bitmatch -I lib
+OCAMLDOCFLAGS  += -html -sort -package bitstring -I lib
 OCAMLDOCFILES  := $(wildcard lib/diskimage*.mli) lib/int63.mli
 
 SUBDIRS                = lib virt-df diskzip
 OCAMLDOCFILES  := $(wildcard lib/diskimage*.mli) lib/int63.mli
 
 SUBDIRS                = lib virt-df diskzip
index 25c30bb..8a784a4 100644 (file)
@@ -54,9 +54,9 @@ if test "x$pkg_xml_light" != "xyes"; then
     AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
 fi
 
     AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
 fi
 
-AC_CHECK_OCAML_PKG(bitmatch)
-if test "x$pkg_bitmatch" != "xyes"; then
-    AC_MSG_ERROR([Cannot find required OCaml package 'bitmatch'])
+AC_CHECK_OCAML_PKG(bitstring)
+if test "x$pkg_bitstring" != "xyes"; then
+    AC_MSG_ERROR([Cannot find required OCaml package 'bitstring'])
 fi
 
 dnl Check for optional OCaml packages.
 fi
 
 dnl Check for optional OCaml packages.
@@ -67,7 +67,7 @@ AC_SUBST(pkg_unix)
 AC_SUBST(pkg_extlib)
 AC_SUBST(pkg_libvirt)
 AC_SUBST(pkg_xml_light)
 AC_SUBST(pkg_extlib)
 AC_SUBST(pkg_libvirt)
 AC_SUBST(pkg_xml_light)
-AC_SUBST(pkg_bitmatch)
+AC_SUBST(pkg_bitstring)
 AC_SUBST(pkg_gettext)
 AC_SUBST(pkg_csv)
 
 AC_SUBST(pkg_gettext)
 AC_SUBST(pkg_csv)
 
index c3632e2..f44d347 100644 (file)
@@ -28,7 +28,7 @@ bindir                = @bindir@
 
 pkg_gettext     = @pkg_gettext@
 
 
 pkg_gettext     = @pkg_gettext@
 
-OCAMLCPACKAGES := -package unix,extlib,bitmatch.syntax,bitmatch -I ../lib
+OCAMLCPACKAGES := -package unix,extlib,bitstring.syntax,bitstring -I ../lib
 
 ifneq ($(pkg_gettext),no)
 OCAMLCPACKAGES  += -package gettext-stub
 
 ifneq ($(pkg_gettext),no)
 OCAMLCPACKAGES  += -package gettext-stub
@@ -37,7 +37,7 @@ endif
 OBJS           := diskzip_gettext.cmo diskzip.cmo
 XOBJS          := $(OBJS:.cmo=.cmx)
 
 OBJS           := diskzip_gettext.cmo diskzip.cmo
 XOBJS          := $(OBJS:.cmo=.cmx)
 
-SYNTAX         := -syntax bitmatch.syntax
+SYNTAX         := -syntax bitstring.syntax
 
 OCAMLCFLAGS    := @OCAMLCFLAGS@ $(SYNTAX)
 OCAMLCLIBS     := -linkpkg diskimage.cma
 
 OCAMLCFLAGS    := @OCAMLCFLAGS@ $(SYNTAX)
 OCAMLCLIBS     := -linkpkg diskimage.cma
index 55094e7..0eed721 100644 (file)
@@ -311,7 +311,7 @@ and go_decompress ?output extcompress args =
 
 
 
 
 
 
-(* Since we have the wonderful pa_bitmatch, might as well use it to
+(* Since we have the wonderful pa_bitstring, might as well use it to
  * define a robust binary format for the compressed files.
  *
  * These functions are in matched pairs "write_foo" / "read_foo" so
  * define a robust binary format for the compressed files.
  *
  * These functions are in matched pairs "write_foo" / "read_foo" so
@@ -359,9 +359,9 @@ and write_header disks =
        0xD152 : 16; 0x01 : 8; 0x00 : 8; (* file magic, version 1.0 *)
        nr_disks : 8                    (* number of disks being packed *)
       } in
        0xD152 : 16; 0x01 : 8; 0x00 : 8; (* file magic, version 1.0 *)
        nr_disks : 8                    (* number of disks being packed *)
       } in
-      let len = Bitmatch.bitstring_length bs in
+      let len = Bitstring.bitstring_length bs in
       assert (len land 7 = 0);
       assert (len land 7 = 0);
-      Bitmatch.string_of_bitstring bs in
+      Bitstring.string_of_bitstring bs in
     let names = List.map (
       fun name ->
        let bs =
     let names = List.map (
       fun name ->
        let bs =
@@ -369,9 +369,9 @@ and write_header disks =
            String.length name : 16;
            name : -1 : string
          } in
            String.length name : 16;
            name : -1 : string
          } in
-       let len = Bitmatch.bitstring_length bs in
+       let len = Bitstring.bitstring_length bs in
        assert (len land 7 = 0);
        assert (len land 7 = 0);
-       Bitmatch.string_of_bitstring bs
+       Bitstring.string_of_bitstring bs
     ) names in
 
     (* Construct the final header. *)
     ) names in
 
     (* Construct the final header. *)
@@ -382,7 +382,7 @@ and write_header disks =
 (*  
 and read_header () =
   (* Diskzip headers are limited to overall max size of 1024 bytes. *)
 (*  
 and read_header () =
   (* Diskzip headers are limited to overall max size of 1024 bytes. *)
-  let bs = Bitmatch.bitstring_of_file_descr_max stdin 1024 in
+  let bs = Bitstring.bitstring_of_file_descr_max stdin 1024 in
 
   bitmatch bs with
   | { 0xD152 : 16;                     (* file magic *)
 
   bitmatch bs with
   | { 0xD152 : 16;                     (* file magic *)
@@ -427,7 +427,7 @@ and write_stretch_header disknum free start_offset len_bytes =
     len_bytes : 64                     (* Length in bytes. *)
   } in
 
     len_bytes : 64                     (* Length in bytes. *)
   } in
 
-  let str = Bitmatch.string_of_bitstring bs in
+  let str = Bitstring.string_of_bitstring bs in
   ignore (write stdout str 0 (String.length str))
 
 and write_stretch dev start_offset len_bytes =
   ignore (write stdout str 0 (String.length str))
 
 and write_stretch dev start_offset len_bytes =
@@ -449,7 +449,7 @@ and write_trailer () =
   let bs = BITSTRING {
     0xD152FFFF_l : 32
   } in
   let bs = BITSTRING {
     0xD152FFFF_l : 32
   } in
-  let str = Bitmatch.string_of_bitstring bs in
+  let str = Bitstring.string_of_bitstring bs in
   ignore (write stdout str 0 (String.length str))
 
 let () = main ()
   ignore (write stdout str 0 (String.length str))
 
 let () = main ()
index d3ea966..e1c8f91 100644 (file)
@@ -3,4 +3,4 @@ version="@PACKAGE_VERSION@"
 description="Library for processing disk images"
 archive(byte)="diskimage.cma"
 archive(native)="diskimage.cmxa"
 description="Library for processing disk images"
 archive(byte)="diskimage.cma"
 archive(native)="diskimage.cmxa"
-requires = "bitmatch"
+requires = "bitstring"
index 5e54923..b508016 100644 (file)
@@ -28,7 +28,7 @@ prefix                = @prefix@
 exec_prefix    = @exec_prefix@
 bindir         = @bindir@
 
 exec_prefix    = @exec_prefix@
 bindir         = @bindir@
 
-OCAMLCPACKAGES := -package unix,extlib,bitmatch.syntax
+OCAMLCPACKAGES := -package unix,extlib,bitstring.syntax
 
 #----------------------------------------------------------------------
 # Build up the list of object files.
 
 #----------------------------------------------------------------------
 # Build up the list of object files.
@@ -54,7 +54,7 @@ XOBJS         := $(OBJS:.cmo=.cmx)
 
 #----------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------
 
-SYNTAX         := -syntax bitmatch.syntax
+SYNTAX         := -syntax bitstring.syntax
 
 OCAMLCFLAGS    := @OCAMLCFLAGS@ $(SYNTAX)
 OCAMLCLIBS     := -linkpkg
 
 OCAMLCFLAGS    := @OCAMLCFLAGS@ $(SYNTAX)
 OCAMLCLIBS     := -linkpkg
index e5de637..2886d35 100644 (file)
@@ -9,8 +9,8 @@ Developer documentation
 This subdirectory contains a library of useful functions for parsing
 disk images.
 
 This subdirectory contains a library of useful functions for parsing
 disk images.
 
-It is all based on and uses the pa_bitmatch syntax extension &
-library.  You need pa_bitmatch >= 1.9.5.
+It is all based on and uses the pa_bitstring syntax extension &
+library.  You need pa_bitstring >= 1.9.7.
 
 This program has suddenly become rather large and confusing.
 Hopefully this documentation should go some way towards explaining
 
 This program has suddenly become rather large and confusing.
 Hopefully this documentation should go some way towards explaining
index cf39e91..ee95453 100644 (file)
@@ -48,9 +48,9 @@ class virtual device :
          Note: A default implementation is provided for [read],
          but it is fairly inefficient because it uses {!map_block} to
          map each block in the request. *)
          Note: A default implementation is provided for [read],
          but it is fairly inefficient because it uses {!map_block} to
          map each block in the request. *)
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
       (** [read_bitstring] is the same as [read] but returns
       (** [read_bitstring] is the same as [read] but returns
-         a pa_bitmatch-style bitstring. *)
+         a pa_bitstring-style bitstring. *)
 
     method virtual blocksize : Int63.t
       (** [blocksize] returns the natural block size of the device. *)
 
     method virtual blocksize : Int63.t
       (** [blocksize] returns the natural block size of the device. *)
@@ -91,7 +91,7 @@ class block_device : string -> Int63.t ->
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
@@ -109,7 +109,7 @@ class offset_device : string -> Int63.t -> Int63.t -> Int63.t -> device ->
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
@@ -129,7 +129,7 @@ class blocksize_overlay : Int63.t -> device ->
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
     method blocksize : Int63.t
     method contiguous : Int63.t -> Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method blocksize : Int63.t
     method contiguous : Int63.t -> Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
index 3a34dcb..05fcd70 100644 (file)
@@ -33,7 +33,7 @@ class virtual device :
     method virtual name : string
     method virtual size : Int63.t
     method read : Int63.t -> Int63.t -> string
     method virtual name : string
     method virtual size : Int63.t
     method read : Int63.t -> Int63.t -> string
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
     method virtual blocksize : Int63.t
     method virtual map_block : Int63.t -> (device * Int63.t) list
     method virtual contiguous : Int63.t -> Int63.t
     method virtual blocksize : Int63.t
     method virtual map_block : Int63.t -> (device * Int63.t) list
     method virtual contiguous : Int63.t -> Int63.t
@@ -44,7 +44,7 @@ class block_device : string -> Int63.t ->
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
@@ -56,7 +56,7 @@ class offset_device : string -> Int63.t -> Int63.t -> Int63.t -> device ->
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
@@ -67,7 +67,7 @@ class blocksize_overlay : Int63.t -> device ->
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
     method name : string
     method size : Int63.t
     method read : Int63.t -> Int63.t -> string
-    method read_bitstring : Int63.t -> Int63.t -> Bitmatch.bitstring
+    method read_bitstring : Int63.t -> Int63.t -> Bitstring.bitstring
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
     method blocksize : Int63.t
     method map_block : Int63.t -> (device * Int63.t) list
     method contiguous : Int63.t -> Int63.t
index a26a686..e43033d 100644 (file)
@@ -415,7 +415,7 @@ and parse_runlist vcn lcn bits =
   | { _ } ->
       if !debug then (
        eprintf "unknown field in the runlist\n%!";
   | { _ } ->
       if !debug then (
        eprintf "unknown field in the runlist\n%!";
-       Bitmatch.hexdump_bitstring Pervasives.stderr bits
+       Bitstring.hexdump_bitstring Pervasives.stderr bits
       );
       []
 
       );
       []
 
index ade050d..312a257 100644 (file)
@@ -28,7 +28,7 @@ bindir                = @bindir@
 
 pkg_gettext     = @pkg_gettext@
 
 
 pkg_gettext     = @pkg_gettext@
 
-OCAMLCPACKAGES := -package unix,extlib,xml-light,libvirt,bitmatch.syntax,bitmatch -I ../lib
+OCAMLCPACKAGES := -package unix,extlib,xml-light,libvirt,bitstring.syntax,bitstring -I ../lib
 
 ifneq ($(pkg_gettext),no)
 OCAMLCPACKAGES  += -package gettext-stub
 
 ifneq ($(pkg_gettext),no)
 OCAMLCPACKAGES  += -package gettext-stub