From: Richard W.M. Jones Date: Wed, 2 Apr 2008 08:14:40 +0000 (+0000) Subject: Outline of documentation. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=2fecbba3804b3788af08786e580483dac9a45294;p=ocaml-bitstring.git Outline of documentation. --- diff --git a/.cvsignore b/.cvsignore index 30b9cfc..3e76a87 100644 --- a/.cvsignore +++ b/.cvsignore @@ -12,3 +12,4 @@ config.h.in config.h config.log config.status +html diff --git a/Makefile.in b/Makefile.in index 859b5e8..78f980e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ # 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: Makefile.in,v 1.2 2008-04-02 08:03:26 rjones Exp $ +# $Id: Makefile.in,v 1.3 2008-04-02 08:14:40 rjones Exp $ PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ @@ -30,6 +30,8 @@ OCAMLCPACKAGES = OCAMLOPTFLAGS = OCAMLOPTPACKAGES = +OCAMLDOCFLAGS = -html -sort + EXAMPLES = $(wildcard examples/*.ml) TESTS = $(patsubst %.ml,%,$(wildcard tests/*.ml)) @@ -80,7 +82,19 @@ clean: rm -f tests/*~ tests/*.cmi tests/*.cmo $(TESTS) rm -f examples/*~ +# Documentation. + +ifneq ($(OCAMLDOC),) +doc: + rm -rf html + mkdir html + $(OCAMLDOC) $(OCAMLDOCFLAGS) -d html bitmatch.mli bitmatch.ml +endif + +# Install. + install: + ocamlfind install bitmatch META *.mli *.cmi *.cmx *.cma *.cmxa *.a # Standard rules. diff --git a/README b/README index 4f5dfd8..75edaf5 100644 --- a/README +++ b/README @@ -1,9 +1,9 @@ ocaml-bitmatch copyright (C) 2008 Red Hat Inc. License: LGPLv2+ with OCaml linking exception. -Please see the doc/ subdirectory for developer documentation. +Please see the html subdirectory for developer documentation. -The only dependencies are OCaml >= 3.10.0, camlp4, and findlib. +The only dependencies are OCaml >= 3.10.0, camlp4, ocamldoc, and findlib. To build: diff --git a/bitmatch.mli b/bitmatch.mli index f875659..9475f8b 100644 --- a/bitmatch.mli +++ b/bitmatch.mli @@ -1,5 +1,5 @@ -(* Bitmatch library. - * Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones +(** Bitmatch library. *) +(* Copyright (C) 2008 Red Hat Inc., Richard W.M. Jones * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,13 +15,26 @@ * 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.7 2008-04-02 08:05:58 rjones Exp $ + * $Id: bitmatch.mli,v 1.8 2008-04-02 08:14:40 rjones Exp $ *) -exception Construct_failure of string * string * int * int +(** + {2 Introduction and examples} + + + {2 Reference} + + {3 Types} +*) type bitstring = string * int * int +(** {3 Exceptions} *) + +exception Construct_failure of string * string * int * int + +(** {3 Bitstrings} *) + val empty_bitstring : bitstring val create_bitstring : int -> bitstring @@ -36,6 +49,8 @@ val hexdump_bitstring : out_channel -> bitstring -> unit val bitstring_length : bitstring -> int +(** {3 Bitstring buffer} *) + module Buffer : sig type t val create : unit -> t @@ -45,6 +60,8 @@ module Buffer : sig val add_byte : t -> int -> unit end +(** {3 Miscellaneous} *) + val debug : bool ref (**/**)