Commits

camlspotter  committed f214b1b

added format pp functions with short names

  • Participants
  • Parent commits a49616d
  • Tags v1.0.1

Comments (0)

Files changed (2)

File lib/xformat.ml

 let stdout = std_formatter
 let stderr = err_formatter
 
+(* pp_open_* => * *)
+let hbox   = pp_open_hbox
+let vbox   = pp_open_vbox
+let hvbox  = pp_open_hvbox
+let hovbox = pp_open_hovbox
+let box    = pp_open_box
+let tag    = pp_open_tag
+let tbox   = pp_open_tbox 
+
+(* pp_close_* => close_* *)
+let close_box  = pp_close_box
+let close_tag  = pp_close_tag
+let close_tbox = pp_close_tbox 
+
+(* pp_print_* => * *)
+let string        = pp_print_string
+let as_           = pp_print_as 
+let int           = pp_print_int 
+let float         = pp_print_float 
+let char          = pp_print_char 
+let bool          = pp_print_bool 
+let break         = pp_print_break
+let tbreak        = pp_print_tbreak
+let cut           ppf = pp_print_cut        ppf ()
+let space         ppf = pp_print_space      ppf ()
+let force_newline ppf = pp_force_newline    ppf () 
+let flush         ppf = pp_print_flush      ppf ()
+let newline       ppf = pp_print_newline    ppf ()
+let if_newline    ppf = pp_print_if_newline ppf ()
+let tab           ppf = pp_print_tab        ppf ()
+
+(* pp_set_* => set_*
+   pp_get_* => *      *)
+let set_tab = pp_set_tab 
+let set_tags = pp_set_tags 
+let set_print_tags = pp_set_print_tags 
+let set_mark_tags = pp_set_mark_tags 
+let print_tags = pp_get_print_tags 
+let mark_tags = pp_get_mark_tags 
+let set_margin = pp_set_margin 
+let margin = pp_get_margin 
+let set_max_indent = pp_set_max_indent 
+let max_indent = pp_get_max_indent 
+let set_max_boxes = pp_set_max_boxes 
+let max_boxes = pp_get_max_boxes 
+let over_max_boxes = pp_over_max_boxes 
+let set_ellipsis_text = pp_set_ellipsis_text 
+let ellipsis_text = pp_get_ellipsis_text 
+let set_formatter_out_channel = pp_set_formatter_out_channel 
+let set_formatter_output_functions = pp_set_formatter_output_functions
+let formatter_output_functions = pp_get_formatter_output_functions
+let set_all_formatter_output_functions = pp_set_all_formatter_output_functions
+let all_formatter_output_functions = pp_get_all_formatter_output_functions
+let set_formatter_tag_functions = pp_set_formatter_tag_functions
+let formatter_tag_functions = pp_get_formatter_tag_functions
+
 let rec list sep f ppf = function
   | [] -> ()
   | [x] -> f ppf x

File lib/xformat.mli

 val list : (t -> unit) -> (t -> 'a -> unit) -> t -> 'a list -> unit
 val option : (t -> 'a -> unit) -> t -> 'a option -> unit
 val lazy_ : (t -> 'a -> unit) -> t -> 'a Lazy.t -> unit
+
+val hbox   : t -> unit -> unit
+val vbox   : t -> int -> unit
+val hvbox  : t -> int -> unit
+val hovbox : t -> int -> unit
+val box    : t -> int -> unit
+val tag    : t -> string -> unit
+val tbox   : t -> unit -> unit
+
+val close_box  : t -> unit -> unit
+val close_tag  : t -> unit -> unit
+val close_tbox : t -> unit -> unit
+
+val string        : t -> string -> unit
+val as_           : t -> int -> string -> unit
+val int           : t -> int -> unit
+val float         : t -> float -> unit
+val char          : t -> char -> unit
+val bool          : t -> bool -> unit
+val break         : t -> int -> int -> unit
+val tbreak        : t -> int -> int -> unit
+val cut           : t -> unit
+val space         : t -> unit
+val force_newline : t -> unit
+val flush         : t -> unit
+val newline       : t -> unit
+val if_newline    : t -> unit
+val tab           : t -> unit
+
+val set_tab : t -> unit -> unit
+val set_tags : t -> bool -> unit
+val set_print_tags : t -> bool -> unit
+val set_mark_tags : t -> bool -> unit
+val print_tags : t -> unit -> bool
+val mark_tags : t -> unit -> bool
+val set_margin : t -> int -> unit
+val margin : t -> unit -> int
+val set_max_indent : t -> int -> unit
+val max_indent : t -> unit -> int
+val set_max_boxes : t -> int -> unit
+val max_boxes : t -> unit -> int
+val over_max_boxes : t -> unit -> bool
+val set_ellipsis_text : t -> string -> unit
+val ellipsis_text : t -> unit -> string
+val set_formatter_out_channel : t -> out_channel -> unit
+val set_formatter_output_functions : t -> (string -> int -> int -> unit) -> (unit -> unit) -> unit
+val formatter_output_functions : t -> unit -> (string -> int -> int -> unit) * (unit -> unit)
+val set_all_formatter_output_functions :
+  t ->
+  out:(string -> int -> int -> unit) ->
+  flush:(unit -> unit) ->
+  newline:(unit -> unit) -> spaces:(int -> unit) -> unit
+val all_formatter_output_functions :
+  t ->
+  unit ->
+  (string -> int -> int -> unit) * (unit -> unit) * (unit -> unit) *
+  (int -> unit)
+val set_formatter_tag_functions : t -> formatter_tag_functions -> unit
+val formatter_tag_functions : t -> unit -> formatter_tag_functions