package dns-client

  1. Overview
  2. Docs
DNS client API

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dns-10.2.6.tbz
sha256=4c3df263dd4596f8563615fe3644e2fad5978b66a268c3ef352083d7fee0ffc8
sha512=1df298223c753092ae8756d5cbd4c1788f716bb6393fa3e9e484ba5acb9bc6a4e394e654785c4e80330eeea3b2809598704d4b043dad2829bc77d14857ebb295

doc/src/dns-client.resolvconf/dns_resolvconf.ml.html

Source file dns_resolvconf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
let parse buf =
  try
    Resolvconf_state.reset ();
    let buf =
      if String.(get buf (pred (length buf))) = '\n' then buf else buf ^ "\n"
    in
    let lexbuf = Lexing.from_string buf in
    Ok (Resolvconf_parser.resolvconf Resolvconf_lexer.lex lexbuf)
  with
  | Parsing.Parse_error ->
    Error (`Msg (Fmt.str "parse error at line %d" Resolvconf_state.(state.lineno)))
  | exn ->
    Error (`Msg (Fmt.str "error at line %d: %s" Resolvconf_state.(state.lineno)
                   (Printexc.to_string exn)))