ORT_PARSE_CLOSE(3)

NAME
ort_parse_close - finalise openradtool configuration

LIBRARY
libort

SYNOPSIS
#include <sys/queue.h>
#include <stdio.h>
#include <ort.h>
int
ort_parse_close(struct config *cfg);

DESCRIPTION
Finalise a configuration cfg previously allocated with ort_config_alloc(3) and populated with ort_parse_file(3). After calling, ort_parse_file(3) may no longer be used.

RETURN VALUES
Returns zero if the finalisation failed, non-zero on success.

EXAMPLES
A simple scenario of creating a configuration, parsing standard input, linking, then performing some task is as follows.

    struct config *cfg;
    if ((cfg = ort_config_alloc()) == NULL)
      err(1, NULL);
    if (!ort_parse_file(cfg, stdin, "<stdin>"))
      errx(1, "failed parsing");
    if (!ort_parse_close(cfg))
      errx(1, "failed linking");
    /* Do something with the configuration. */
    ort_config_free(cfg);

SEE ALSO
ort(3)