pp

Pretty Printer

Functions

FunctionDescription
pp_nlPrint newline.
pp_sepPrint separator.
pp_indentPrint indentation (2 spaces per level).
pp_print_intInternal: print integer to stdout using write buf.
pp_intPrint an integer.
pp_strPrint a string with double quotes.
pp_hexPrint integer as hex.
pp_binPrint integer as binary.
pp_vecPretty-print a vec: [1, 2, 3]
pp_vec_namedPretty-print a named vec: name = [1, 2, 3]
pp_matPretty-print a matrix with alignment.
pp_bytesHex dump of raw bytes (16 per line).
pp_labelPrint a label: “name: "
pp_kv_intPrint “key = value\n”
pp_kv_hexPrint “key = 0xvalue\n”

Details

pp_nl

fn pp_nl()

Print newline.

pp_sep

fn pp_sep()

Print separator.

pp_indent

fn pp_indent(level: i64)

Print indentation (2 spaces per level).

pp_print_int

fn pp_print_int(val: i64)

Internal: print integer to stdout using write buf.

pp_int

fn pp_int(val: i64)

Print an integer.

pp_str

fn pp_str(s: &i8, len: i64)

Print a string with double quotes.

pp_hex

fn pp_hex(val: i64)

Print integer as hex.

pp_bin

fn pp_bin(val: i64)

Print integer as binary.

pp_vec

fn pp_vec(v: &i64)

Pretty-print a vec: [1, 2, 3]

pp_vec_named

fn pp_vec_named(name: &i8, nlen: i64, v: &i64)

Pretty-print a named vec: name = [1, 2, 3]

pp_mat

fn pp_mat(m: &i64)

Pretty-print a matrix with alignment.

pp_bytes

fn pp_bytes(data: &i8, len: i64)

Hex dump of raw bytes (16 per line).

pp_label

fn pp_label(name: &i8, nlen: i64)

Print a label: “name: "

pp_kv_int

fn pp_kv_int(key: &i8, klen: i64, val: i64)

Print “key = value\n”

pp_kv_hex

fn pp_kv_hex(key: &i8, klen: i64, val: i64)

Print “key = 0xvalue\n”