package macaddr

  1. Overview
  2. Docs
A library for manipulation of MAC address representations

Install

Dune Dependency

Authors

Maintainers

Sources

ipaddr-v5.0.1.tbz
sha256=00f7c3c38cff938d3ace70dd32e6d3103390567c9030b406ba85840f01d76602
sha512=0c01117255692f929bb99ba0f7b973859bebb09e7d738adb72954471099a6a4d10741cd5796415fa106f04169c2b5455fa669d4a7fee400505bd3ba005b5b7fb

doc/src/macaddr.top/macaddr_top.ml.html

Source file macaddr_top.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
let printers = [ "Macaddr.pp" ]

let eval_string ?(print_outcome = false) ?(err_formatter = Format.err_formatter)
    str =
  let lexbuf = Lexing.from_string str in
  let phrase = !Toploop.parse_toplevel_phrase lexbuf in
  Toploop.execute_phrase print_outcome err_formatter phrase

let rec install_printers = function
  | [] -> true
  | printer :: printers ->
      let cmd = Printf.sprintf "#install_printer %s;;" printer in
      eval_string cmd && install_printers printers

let () =
  if not (install_printers printers) then
    Format.eprintf "Problem installing Macaddr-printers@."
OCaml

Innovation. Community. Security.