nqdrpt(3)
NAME
nqdrpt — a report
of a capsule and its data record
LIBRARY
libnqd, -lnqd -lnoqtis
SYNOPSIS
#include
<nqd.h>
#define NQDMD 1
#define NQDTXT 2
int
nqdrpt(const char *dir,
const nqrep *crep, const nqdrep
*drep, int fmt, char *out,
size_t cap, size_t *outlen);
DESCRIPTION
nqdrpt()
writes a report of the capsule in dir to
out (cap bytes, a NUL added), in
Markdown (NQDMD) or plain text
(NQDTXT): a line saying whether every check passed
and how many of how many failed; the rows of crep, the
capsule's check (nqchk(3)),
or, when crep is NULL (a
folder not sealed), a line saying so, which counts as a failed check; then a
section on the data record
(noqtis-data(5)): its
sources, schemas, drift summaries (and whether they are calibrated),
environment, steps, recorded checks, commitments and citation, and the rows
of drep
(nqdchk(3)), each named
‘data.check’;
with drep NULL,
nqdchk()
is run here. A folder without a record has no data rows.
A value of the record never breaks its line or its table cell: a
line break or other control character in it is a space, and in Markdown each
character Markdown could read as markup (‘\ ` * _ [
] < > | # ~ & !’) gets one backslash before it,
once.
RETURN VALUES
NQOK; NQEBUF with
*outlen set to the report's length when
cap is too small; NQEARG for a
dir of NULL or another
fmt; NQEMEM. A record that
does not read is a failed
‘data.record’ row, not an error.