.\" -*-nroff-*- .\" .\" Manual for test-vector framework register type interface .\" .\" (c) 2024 Straylight/Edgeware .\" . .\"----- Licensing notice --------------------------------------------------- .\" .\" This file is part of the mLib utilities library. .\" .\" mLib is free software: you can redistribute it and/or modify it under .\" the terms of the GNU Library General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or (at .\" your option) any later version. .\" .\" mLib is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public .\" License for more details. .\" .\" You should have received a copy of the GNU Library General Public .\" License along with mLib. If not, write to the Free Software .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, .\" USA. . .\"-------------------------------------------------------------------------- .so ../defs.man \" @@@PRE@@@ . .\"-------------------------------------------------------------------------- .TH tvec-tyimpl 3mLib "11 March 2024" "Straylight/Edgeware" "mLib utilities library" .\" @tvec_syntax .\" @tvec_syntax_v . .\" @tvec_skipspc .\" @tvec_flushtonext .\" @tvec_nexttoken .\" @tvec_readword .\" @tvec_readword_v . .\"-------------------------------------------------------------------------- .SH NAME tvec-tyimpl \- test vector framework type implementation . .\"-------------------------------------------------------------------------- .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 ..." .B "#define TVSF_RAW ..." .B "#define TVSF_NEXT ..." .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_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