chiark / gitweb /
@@@ fltfmt wip
[mLib] / test / tvec-tyimpl.3.in
CommitLineData
d056fbdf 1.\" -*-nroff-*-
c4ccbbf9
MW
2.\"
3.\" Manual for test-vector framework register type interface
4.\"
5.\" (c) 2024 Straylight/Edgeware
6.\"
7.
8.\"----- Licensing notice ---------------------------------------------------
9.\"
10.\" This file is part of the mLib utilities library.
11.\"
12.\" mLib is free software: you can redistribute it and/or modify it under
13.\" the terms of the GNU Library General Public License as published by
14.\" the Free Software Foundation; either version 2 of the License, or (at
15.\" your option) any later version.
16.\"
17.\" mLib is distributed in the hope that it will be useful, but WITHOUT
18.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
20.\" License for more details.
21.\"
22.\" You should have received a copy of the GNU Library General Public
23.\" License along with mLib. If not, write to the Free Software
24.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
25.\" USA.
26.
27.\"--------------------------------------------------------------------------
28.so ../defs.man \" @@@PRE@@@
29.
30.\"--------------------------------------------------------------------------
31.TH tvec-tyimpl 3mLib "11 March 2024" "Straylight/Edgeware" "mLib utilities library"
d056fbdf
MW
32.\" @tvec_syntax
33.\" @tvec_syntax_v
34.
35.\" @tvec_skipspc
36.\" @tvec_flushtoeol
37.\" @tvec_nexttoken
38.\" @tvec_readword
39.\" @tvec_readword_v
40.
c4ccbbf9
MW
41.\"--------------------------------------------------------------------------
42.SH NAME
43tvec-tyimpl \- test vector framework type implementation
44.
45.\"--------------------------------------------------------------------------
d056fbdf 46.SH SYNOPSIS
c4ccbbf9 47.
d056fbdf
MW
48.nf
49.B "#include <mLib/tvec.h>"
50.PP
51.B "struct tvec_state {"
52.B " unsigned f;"
53.B " const char *infile; unsigned lno, test_lno;"
54.B " FILE *fp;"
55.B " ..."
56.B "};"
57.PP
58.B "struct tvec_regty {"
59.ta 2n +\w'\fBvoid (*init)('u
60.BI " void (*init)(union tvec_regval *" rv ,
61.BI " const struct tvec_regdef *" rd );
62.ta 2n +\w'\fBvoid (*release)('u
63.BI " void (*release)(union tvec_regval *" rv ,
64.BI " const struct tvec_regdef *" rd );
65.ta 2n +\w'\fBint (*eq)('u
66.BI " int (*eq)(const union tvec_regval *" rv0 ,
67.BI " const union tvec_regval *" rv1 ,
68.BI " const struct tvec_regdef *" rd );
69.ta 2n +\w'\fBint (*tobuf)('u
70.BI " int (*tobuf)(buf *" b ", const union tvec_regval *" rv ,
71.BI " const struct tvec_regdef *" rd );
72.ta 2n +\w'\fBint (*frombuf)('u
73.BI " int (*frombuf)(buf *" b ", union tvec_regval *" rv ,
74.BI " const struct tvec_regdef *" rd );
75.ta 2n +\w'\fBint (*parse)('u
76.BI " int (*parse)(union tvec_regval *" rv ", const struct tvec_regdef *" rd ,
77.BI " struct tvec_state *" tv );
78.ta 2n +\w'\fBvoid (*dump)('u
79.BI " void (*dump)(const union tvec_regval *" rv ,
80.BI " const struct tvec_regdef *" rd ,
81.BI " unsigned " style ,
82.BI " const struct gprintf_ops *" gops ", void *" go );
83.B "};"
84.B "#define TVSF_COMPACT ..."
5c0f2e08 85.B "#define TVSF_RAW ..."
d056fbdf
MW
86.PP
87.ta \w'\fBint tvec_syntax('u
88.BI "int tvec_syntax(struct tvec_state *" tv ", int " ch ,
89.BI " const char *" expect ", ...);"
90.ta \w'\fBint tvec_syntax_v('u
91.BI "int tvec_syntax(struct tvec_state *" tv ", int " ch ,
92.BI " const char *" expect ", va_list *" ap );
93.PP
94.B "#define TVFF_ALLOWANY ..."
95.B "void tvec_skipspc(struct tvec_state *" tv );
96.B "int tvec_flushtoeol(struct tvec_state *" tv );
97.B "int tvec_nexttoken(struct tvec_state *" tv );
98.ta \w'\fBint tvec_readword('u
99.BI "int tvec_readword(struct tvec_state *" tv ", dstr *" d ,
100.BI " const char **" p_inout ", const char *" delims ,
101.BI " const char *" expect ", ...);"
102.ta \w'\fBint tvec_readword_v('u
103.BI "int tvec_readword_v(struct tvec_state *" tv ", dstr *" d ,
104.BI " const char **" p_inout ", const char *" delims ,
105.BI " const char *" expect ", va_list *" ap );
106.fi