ORT_LANG_C_MANPAGE(3) Library Functions Manual ORT_LANG_C_MANPAGE(3)

ort_lang_c_manpagegenerate C API documentation from openradtool configuration

library “libort-lang-c”

#include <sys/queue.h>
#include <stdio.h>
#include <ort.h>
#include <ort-lang-c.h>

int
ort_lang_c_manpage(const struct ort_lang_c *args, const struct config *cfg, FILE *f);

Outputs C API documentation from the parsed configuration cfg to f with the parameters in args. The arguments recgnised in args are as follows:

unsigned int flags
The bit-field of components to output. Only ORT_LANG_C_JSON_JSMN, ORT_LANG_C_JSON_KCGI, and ORT_LANG_C_VALID_KCGI are recognised.

By default, () behaves as if all argument values were zero. The generated content is in standard mdoc(7).

Returns zero on failure, non-zero on success.

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");
if (!ort_lang_c_manpage(NULL, cfg, stdout))
  errx(1, "failed output");

ort_config_free(cfg);

ort(3), ort_lang_c_header(3), ort_lang_c_source(3)

August 31, 2024 OpenBSD 7.5