mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-02-25 16:17:52 +01:00
-safe-string
This commit is contained in:
parent
1635580c73
commit
18075b84ce
4
Makefile
4
Makefile
@ -7,8 +7,8 @@ RESULT = cpdf
|
|||||||
ANNOTATE = true
|
ANNOTATE = true
|
||||||
PACKS = camlpdf
|
PACKS = camlpdf
|
||||||
|
|
||||||
OCAMLNCFLAGS = -g -unsafe-string -w -3 -annot
|
OCAMLNCFLAGS = -g -safe-string -w -3 -annot
|
||||||
OCAMLBCFLAGS = -g -unsafe-string -w -3 -annot
|
OCAMLBCFLAGS = -g -safe-string -w -3 -annot
|
||||||
OCAMLLDFLAGS = -g
|
OCAMLLDFLAGS = -g
|
||||||
|
|
||||||
all : native-code native-code-library byte-code-library top htdoc
|
all : native-code native-code-library byte-code-library top htdoc
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
%FIXME: Finish and document -dump-attachments.
|
||||||
%FIXME: Mention that OpenAction supersedes PageLayout so use -remove-dict-option to get rid of it
|
%FIXME: Mention that OpenAction supersedes PageLayout so use -remove-dict-option to get rid of it
|
||||||
%FIXME: Document new -hard-box option
|
%FIXME: Document new -hard-box option
|
||||||
%FIXME: Document that -upright also shifts the page to 0,0
|
%FIXME: Document that -upright also shifts the page to 0,0
|
||||||
|
2
xmlm.ml
2
xmlm.ml
@ -961,7 +961,7 @@ struct
|
|||||||
let make_output ?(decl = true) ?(nl = false) ?(indent = None)
|
let make_output ?(decl = true) ?(nl = false) ?(indent = None)
|
||||||
?(ns_prefix = fun _ ->None) d =
|
?(ns_prefix = fun _ ->None) d =
|
||||||
let outs, outc = match d with
|
let outs, outc = match d with
|
||||||
| `Channel c -> (output c), (output_char c)
|
| `Channel c -> (output_substring c), (output_char c)
|
||||||
| `Buffer b -> (Std_buffer.add_substring b), (Std_buffer.add_char b)
|
| `Buffer b -> (Std_buffer.add_substring b), (Std_buffer.add_char b)
|
||||||
| `Fun f ->
|
| `Fun f ->
|
||||||
let os s p l =
|
let os s p l =
|
||||||
|
76
xmlm.mli
76
xmlm.mli
@ -1,7 +1,7 @@
|
|||||||
(*---------------------------------------------------------------------------
|
(*---------------------------------------------------------------------------
|
||||||
Copyright 2007 Daniel C. Bünzli. All rights reserved.
|
Copyright (c) 2007 Daniel C. Bünzli. All rights reserved.
|
||||||
Distributed under a BSD3 license, see license at the end of the file.
|
Distributed under the ISC license, see terms at the end of the file.
|
||||||
%%NAME%% release %%VERSION%%
|
%%NAME%% %%VERSION%%
|
||||||
---------------------------------------------------------------------------*)
|
---------------------------------------------------------------------------*)
|
||||||
|
|
||||||
(** Streaming XML codec.
|
(** Streaming XML codec.
|
||||||
@ -17,7 +17,7 @@
|
|||||||
Consult the {{!io}features and limitations} and {{!ex}examples}
|
Consult the {{!io}features and limitations} and {{!ex}examples}
|
||||||
of use.
|
of use.
|
||||||
|
|
||||||
{e Release %%VERSION%% — %%MAINTAINER%% }
|
{e %%VERSION%% — {{:%%PKG_HOMEPAGE%% }homepage}}
|
||||||
|
|
||||||
{3 References}
|
{3 References}
|
||||||
{ul
|
{ul
|
||||||
@ -65,10 +65,14 @@ type signal = [ `Dtd of dtd | `El_start of tag | `El_end | `Data of string ]
|
|||||||
to the language of the [doc] grammar :
|
to the language of the [doc] grammar :
|
||||||
{[doc ::= `Dtd tree
|
{[doc ::= `Dtd tree
|
||||||
tree ::= `El_start child `El_end
|
tree ::= `El_start child `El_end
|
||||||
child ::= `Data | tree | epsilon ]}
|
child ::= `Data trees | trees
|
||||||
|
trees ::= tree child | epsilon]}
|
||||||
|
The [trees] production is used to expresses the fact that there will
|
||||||
|
never be two consecutive `Data signals in the children of an element.
|
||||||
|
|
||||||
Input and output deal only with well-formed sequences or
|
Input and output deal only with well-formed sequences or
|
||||||
exceptions are raised.
|
exceptions are raised. However on output consecutive [`Data]
|
||||||
*)
|
signals are allowed. *)
|
||||||
|
|
||||||
val ns_xml : string
|
val ns_xml : string
|
||||||
(** Namespace name {{:http://www.w3.org/XML/1998/namespace}value} bound to the
|
(** Namespace name {{:http://www.w3.org/XML/1998/namespace}value} bound to the
|
||||||
@ -78,6 +82,25 @@ val ns_xmlns : string
|
|||||||
(** Namespace name {{:http://www.w3.org/2000/xmlns/}value} bound to the
|
(** Namespace name {{:http://www.w3.org/2000/xmlns/}value} bound to the
|
||||||
reserved ["xmlns"] prefix. *)
|
reserved ["xmlns"] prefix. *)
|
||||||
|
|
||||||
|
val pp_dtd : Format.formatter -> dtd -> unit
|
||||||
|
(** [pp_dtd ppf dtd] prints an unspecified representation of [dtd] on [ppf]. *)
|
||||||
|
|
||||||
|
val pp_name : Format.formatter -> name -> unit
|
||||||
|
(** [pp_name ppf name] prints an unspecified representation of [name] on
|
||||||
|
[ppf]. *)
|
||||||
|
|
||||||
|
val pp_attribute : Format.formatter -> attribute -> unit
|
||||||
|
(** [pp_attribute ppf att] prints an unspecified representation of [att] on
|
||||||
|
[ppf]. *)
|
||||||
|
|
||||||
|
val pp_tag : Format.formatter -> tag -> unit
|
||||||
|
(** [pp_tag ppf tag] prints an unspecified representation of [tag] on
|
||||||
|
[ppf]. *)
|
||||||
|
|
||||||
|
val pp_signal : Format.formatter -> signal -> unit
|
||||||
|
(** [pp_signal ppf s] prints an unspecified representation of [s] on
|
||||||
|
[ppf]. *)
|
||||||
|
|
||||||
(** {1 Input} *)
|
(** {1 Input} *)
|
||||||
|
|
||||||
type pos = int * int
|
type pos = int * int
|
||||||
@ -781,34 +804,17 @@ let out_w3c_bureaucrats dst bl =
|
|||||||
*)
|
*)
|
||||||
|
|
||||||
(*---------------------------------------------------------------------------
|
(*---------------------------------------------------------------------------
|
||||||
Copyright 2007 Daniel C. Bünzli
|
Copyright (c) 2007 Daniel C. Bünzli
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
modification, are permitted provided that the following conditions are
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
met:
|
copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
notice, this list of conditions and the following disclaimer.
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
notice, this list of conditions and the following disclaimer in the
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
documentation and/or other materials provided with the
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
distribution.
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
3. Neither the name of Daniel C. Bünzli nor the names of
|
|
||||||
contributors may be used to endorse or promote products derived
|
|
||||||
from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
||||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
||||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
---------------------------------------------------------------------------*)
|
---------------------------------------------------------------------------*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user