.\" -*-nroff-*- .de VS .sp 1 .RS .nf .ft B .. .de VE .ft R .fi .RE .sp 1 .. .de hP .IP .ft B \h'-\w'\\$1\ 'u'\\$1\ \c .ft P .. .ie t \{\ . ds o \(bu . de VP . sp .4v .. \} .el \{\ . ds o o . de VP . sp .. \} .. .TH tvec-tyimpl 3 "11 March 2024" "Straylight/Edgeware" "mLib utilities library" .SH NAME tvec-tyimpl \- test vector framework type implementation .\" @tvec_syntax .\" @tvec_syntax_v . .\" @tvec_skipspc .\" @tvec_flushtoeol .\" @tvec_nexttoken .\" @tvec_readword .\" @tvec_readword_v . .SH SYNOPSIS .nf .B "#include " .PP .B "struct tvec_state {" .B " unsigned f;" .B " const char *infile; unsigned lno, test_lno;" .B " FILE *fp;" .B " ..." .B "};" .PP .B "struct tvec_regty {" .ta 2n +\w'\fBvoid (*init)('u .BI " void (*init)(union tvec_regval *" rv , .BI " const struct tvec_regdef *" rd ); .ta 2n +\w'\fBvoid (*release)('u .BI " void (*release)(union tvec_regval *" rv , .BI " const struct tvec_regdef *" rd ); .ta 2n +\w'\fBint (*eq)('u .BI " int (*eq)(const union tvec_regval *" rv0 , .BI " const union tvec_regval *" rv1 , .BI " const struct tvec_regdef *" rd ); .ta 2n +\w'\fBint (*tobuf)('u .BI " int (*tobuf)(buf *" b ", const union tvec_regval *" rv , .BI " const struct tvec_regdef *" rd ); .ta 2n +\w'\fBint (*frombuf)('u .BI " int (*frombuf)(buf *" b ", union tvec_regval *" rv , .BI " const struct tvec_regdef *" rd ); .ta 2n +\w'\fBint (*parse)('u .BI " int (*parse)(union tvec_regval *" rv ", const struct tvec_regdef *" rd , .BI " struct tvec_state *" tv ); .ta 2n +\w'\fBvoid (*dump)('u .BI " void (*dump)(const union tvec_regval *" rv , .BI " const struct tvec_regdef *" rd , .BI " unsigned " style , .BI " const struct gprintf_ops *" gops ", void *" go ); .B "};" .B "#define TVSF_COMPACT ..." .PP .ta \w'\fBint tvec_syntax('u .BI "int tvec_syntax(struct tvec_state *" tv ", int " ch , .BI " const char *" expect ", ...);" .ta \w'\fBint tvec_syntax_v('u .BI "int tvec_syntax(struct tvec_state *" tv ", int " ch , .BI " const char *" expect ", va_list *" ap ); .PP .B "#define TVFF_ALLOWANY ..." .B "void tvec_skipspc(struct tvec_state *" tv ); .B "int tvec_flushtoeol(struct tvec_state *" tv ); .B "int tvec_nexttoken(struct tvec_state *" tv ); .ta \w'\fBint tvec_readword('u .BI "int tvec_readword(struct tvec_state *" tv ", dstr *" d , .BI " const char **" p_inout ", const char *" delims , .BI " const char *" expect ", ...);" .ta \w'\fBint tvec_readword_v('u .BI "int tvec_readword_v(struct tvec_state *" tv ", dstr *" d , .BI " const char **" p_inout ", const char *" delims , .BI " const char *" expect ", va_list *" ap ); .fi