summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Weis <Pierre.Weis@inria.fr>2002-03-22 20:43:07 +0000
committerPierre Weis <Pierre.Weis@inria.fr>2002-03-22 20:43:07 +0000
commitc4b203f34c45c1f5974c21aad048bd06bc9faa2b (patch)
tree012996622b19cfa37c244ee90b26535db0f82192
parentad2496238313a88ba1856627d39fda873d62af1b (diff)
Added get_* for tag printing status.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4555 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--stdlib/format.ml6
-rw-r--r--stdlib/format.mli5
2 files changed, 11 insertions, 0 deletions
diff --git a/stdlib/format.ml b/stdlib/format.ml
index 50958542a..35e03ebea 100644
--- a/stdlib/format.ml
+++ b/stdlib/format.ml
@@ -477,6 +477,8 @@ let pp_close_tag state () =
let pp_set_print_tags state b = state.pp_print_tags <- b;;
let pp_set_mark_tags state b = state.pp_mark_tags <- b;;
+let pp_get_print_tags state () = state.pp_print_tags;;
+let pp_get_mark_tags state () = state.pp_mark_tags;;
let pp_get_formatter_tag_functions state () =
{mark_open_tag = state.pp_mark_open_tag;
@@ -821,8 +823,12 @@ and get_formatter_tag_functions =
pp_get_formatter_tag_functions std_formatter
and set_print_tags =
pp_set_print_tags std_formatter
+and get_print_tags =
+ pp_get_print_tags std_formatter
and set_mark_tags =
pp_set_mark_tags std_formatter
+and get_mark_tags =
+ pp_get_mark_tags std_formatter
;;
diff --git a/stdlib/format.mli b/stdlib/format.mli
index 4600b43ab..2816fc812 100644
--- a/stdlib/format.mli
+++ b/stdlib/format.mli
@@ -303,6 +303,9 @@ val set_mark_tags : bool -> unit;;
``verbatim'' material or richer decorated output depending on the
treatment of tags. Default behavior of the pretty printer is to
print tags and markers of tags. *)
+val get_print_tags : unit -> bool;;
+val get_mark_tags : unit -> bool;;
+(** Return the current status of tag printing and marking. *)
(** {6 Ellipsis} *)
@@ -471,6 +474,8 @@ val pp_set_tab : formatter -> unit -> unit;;
val pp_print_tab : formatter -> unit -> unit;;
val pp_set_print_tags : formatter -> bool -> unit;;
val pp_set_mark_tags : formatter -> bool -> unit;;
+val pp_get_print_tags : formatter -> unit -> bool;;
+val pp_get_mark_tags : formatter -> unit -> bool;;
val pp_set_margin : formatter -> int -> unit;;
val pp_get_margin : formatter -> unit -> int;;
val pp_set_max_indent : formatter -> int -> unit;;