package macaddr

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

Install

Dune Dependency

Authors

Maintainers

Sources

ipaddr-5.3.1.tbz
sha256=9820bcbccadb6e6d9e22fe26b2f9a044897c8f47c29d157f464b41a2f191e7d4
sha512=1d400f8344d1a8c2ac1c55e4a7167484034094e2227ce7c8f2f45843b0875a83030851400ceb96b5cdb756fa8798d83c77d839705fcb9e3f2bd5e46d337d63d0

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.