package macaddr

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ipaddr-5.6.1.tbz
sha256=1e617df8abd45843c823e9be75267d27426cb578661cf25622d50b25ae14a319
sha512=09c37f963d27f697ee17b83f26364002cc2e60516c2199f78cd20663aaf293a1ce4380d728641b4c9b79066dc814c8f9293722a567ce6898261c4e98b34d80c2

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.