package macaddr

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

Install

Dune Dependency

Authors

Maintainers

Sources

ipaddr-5.3.0.tbz
sha256=36979edf64b464d44055f3504b97d61e22050e7369d983052c4ecc3d2b1ab755
sha512=06b16e319672c8182210296ed005accd9a4e190f99bd019f24232e213be8de6d198f9e8cb40ee00ec226184e1dd4ebd7e589d890b1f88f40f17eaf785dae975c

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.