NAME
ort_lang_c_manpage
—
generate C API documentation from
openradtool configuration
LIBRARY
library “libort-lang-c”
SYNOPSIS
#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);
DESCRIPTION
Outputs C API documentation from the parsed configuration cfg to f with the parameters in args. This function interface is likely to change. 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
, andORT_LANG_C_VALID_KCGI
are recognised.
By default,
ort_lang_c_manpage
()
behaves as if all argument values were zero. The generated content is in
standard mdoc(7).
RETURN VALUES
Returns zero on failure, 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"); if (!ort_lang_c_manpage(NULL, cfg, stdout)) errx(1, "failed output"); ort_config_free(cfg);