package binsec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Extra pretty-printing functions

type sformat = (unit, Format.formatter, unit) format
type 'a formatter = Format.formatter -> 'a -> unit
val pp_list : ?pre:sformat -> ?post:sformat -> ?sep:sformat -> 'a formatter -> 'a list formatter

pp_list ~pre ~post ~sep pp_e ppf l pretty-prints list l between opening formatting indication pre and closing formatting indication post using pretty-printer pp_e to print its elements, separating by formatting indication sep.

Default values are:

  • the empty string formatting indication for pre and post
  • ";" for sep
val pp_as_string : ('a -> string) -> 'a formatter

pp_as_string f ppf v

val pp_opt_as_string : ('a -> string) -> 'a option formatter
val pp_opt : 'a formatter -> 'a option formatter
val string_from_pp : 'a formatter -> 'a -> string

string_from_pp pp v renders value v as string according to its pretty-printer pp

val pp_dba_prelude : ?flat_memory:bool -> unit formatter
val pp_byte : ?prefixed:bool -> int formatter

pp_byte prefixed ppf by prints as hexadecimal byte by into ppf If prefixed is true (default) it also prepends "0x". This function assumes that by is between 0 ad 255.

val pp_to_file : filename:string -> 'a formatter -> 'a -> unit