package macaddr

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

Install

Dune Dependency

Authors

Maintainers

Sources

ipaddr-5.4.0.tbz
sha256=5a66291bf710b45f7e9550ecd562227af519d5fefe899da1b9fb1d0f51c735ea
sha512=c0c564529bceeb1263a6200f5f86c53ee38874a7cd3ba6dd4b435cb87e0247ba85b0ee46ab5f517ef81aa05f4187d2ba20d10013d3faa2763b64daf85046ae96

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.