17 \h'-\w'\\$1\ 'u'\\$1\ \c
33 .TH tvec-types 3 "11 March 2024" "Straylight/Edgeware" "mLib utilities library"
35 tvec-types \- test vector framework provided register types
73 .\" @tvec_claimeq_uint
74 .\" @tvec_claimeqish_float
75 .\" @tvec_claimeq_float
76 .\" @tvec_claimeq_ienum
77 .\" @tvec_claimeq_uenum
78 .\" @tvec_claimeq_fenum
79 .\" @tvec_claimeq_penum
80 .\" @tvec_claimeq_flags
81 .\" @tvec_claimeq_char
82 .\" @tvec_claimeq_text
83 .\" @tvec_claimeq_textz
84 .\" @tvec_claimeq_bytes
86 .\" @TVEC_CLAIMEQ_UINT
87 .\" @TVEC_CLAIMEQISH_FLOAT
88 .\" @TVEC_CLAIMEQ_FLOAT
89 .\" @TVEC_CLAIMEQ_IENUM
90 .\" @TVEC_CLAIMEQ_UENUM
91 .\" @TVEC_CLAIMEQ_FENUM
92 .\" @TVEC_CLAIMEQ_PENUM
93 .\" @TVEC_CLAIMEQ_FLAGS
94 .\" @TVEC_CLAIMEQ_CHAR
95 .\" @TVEC_CLAIMEQ_TEXT
96 .\" @TVEC_CLAIMEQ_TEXTZ
97 .\" @TVEC_CLAIMEQ_BYTES
99 .\" @tvec_parsedurunit
103 .\" @tvec_allocbuffer
107 .B "#include <mLib/tvec.h>"
109 .B "const struct tvec_regty tvty_int, tvty_uint;"
111 .B "struct tvec_irange { long min, max; };"
112 .B "struct tvec_urange { unsigned long min, max; };"
115 .B "const struct tvec_irange"
116 .B " tvrange_schar, tvrange_short, tvrange_int, tvrange_long,"
117 .B " tvrange_sbyte, tvrange_i16, tvrange_i32;"
118 .B "const struct tvec_urange"
119 .B " tvrange_uchar, tvrange_ushort, tvrange_uint,"
120 .B " tvrange_ulong, tvrange_size,"
121 .B " tvrange_byte, tvrange_u16, tvrange_u32;"
123 .ta \w'\fBint tvec_claimeq_int('u
124 .BI "int tvec_claimeq_int(struct tvec_state *" tv ,
125 .BI " long " i0 ", long " i1 ,
126 .BI " const char *" file ", unsigned " lno ,
127 .BI " const char *" expr );
128 .BI "int TVEC_CLAIMEQ_INT(struct tvec_state *" tv ", long " i0 ", long " i1 );
129 .ta \w'\fBint tvec_claimeq_uint('u
130 .BI "int tvec_claimeq_uint(struct tvec_state *" tv ,
131 .BI " unsigned long " u0 ", unsigned long " u1 ,
132 .BI " const char *" file ", unsigned " lno ,
133 .BI " const char *" expr );
134 .ta \w'\fBint TVEC_CLAIMEQ_UINT('u
135 .BI "int TVEC_CLAIMEQ_UINT(struct tvec_state *" tv ,
136 .BI " unsigned long " u0 ", unsigned long " u1 );
138 .B "const struct tvec_regty tvty_float;"
141 .B "struct tvec_floatinfo {"
143 .B " double min, max;"
146 .B "#define TVFF_NOMIN ..."
147 .B "#define TVFF_NOMAX ..."
148 .B "#define TVFF_NANOK ..."
149 .B "#define TVFF_EQMASK ..."
150 .B "#define TVFF_EXACT ..."
151 .B "#define TVFF_ABSDELTA ..."
152 .B "#define TVFF_RELDELTA ..."
154 .B "const struct tvec_floatinfo tvflt_finite, tvflt_nonneg;"
156 .ta \w'\fBint tvec_claimeqish_float('u
157 .BI "int tvec_claimeqish_float(struct tvec_state *" tv ,
158 .BI " double " f0 ", double " f1 ,
159 .BI " unsigned " f ", double " delta ,
160 .BI " const char *" file ", unsigned " lno ,
161 .BI " const char *" expr );
162 .ta \w'\fBint TVEC_CLAIMEQISH_FLOAT('u
163 .BI "int TVEC_CLAIMEQISH_FLOAT(struct tvec_state *" tv ,
164 .BI " double " f0 ", double " f1 ,
165 .BI " unsigned " f ", double " delta );
166 .ta \w'\fBint tvec_claimeq_float('u
167 .BI "int tvec_claimeq_float(struct tvec_state *" tv ,
168 .BI " double " f0 ", double " f1 ,
169 .BI " const char *" file ", unsigned " lno ,
170 .BI " const char *" expr );
171 .ta \w'\fBint TVEC_CLAIMEQ_FLOAT('u
172 .BI "int TVEC_CLAIMEQ_FLOAT(struct tvec_state *" tv ,
173 .BI " double " f0 ", double " f1 );
175 .B "const struct tvec_regty tvty_duration;"
177 .BI "int tvec_parsedurunit(double *" scale_out ", const char **" p_inout );
179 .B "const struct tvec_regty tvty_ienum, tvty_uenum, tvty_fenum, tvty_penum;"
181 .B "struct tvec_iassoc { const char *tag; long i; };"
182 .B "struct tvec_uassoc { const char *tag; unsigned long u; };"
183 .B "struct tvec_fassoc { const char *tag; double f; };"
184 .B "struct tvec_passoc { const char *tag; void *p; };"
185 .B "#define TVEC_ENDENUM ..."
188 .B "struct tvec_ienuminfo {"
189 .B " const char *name;"
190 .B " const struct tvec_iassoc *av;"
191 .B " const struct tvec_irange *ir;"
193 .B "struct tvec_uenuminfo {"
194 .B " const char *name;"
195 .B " const struct tvec_uassoc *av;"
196 .B " const struct tvec_urange *ur;"
198 .B "struct tvec_fenuminfo {"
199 .B " const char *name;"
200 .B " const struct tvec_fassoc *av;"
201 .B " const struct tvec_floatinfo *fi;"
203 .B "struct tvec_penuminfo {"
204 .B " const char *name;"
205 .B " const struct tvec_passoc *av;"
207 .B "const struct tvec_ienuminfo tvenum_bool;"
208 .B "const struct tvec_ienuminfo tvenum_cmp;"
210 .ta \w'\fBint tvec_claimeq_ienum('u
211 .BI "int tvec_claimeq_ienum(struct tvec_state *" tv ,
212 .BI " const struct tvec_uenuminfo *" ei ,
213 .BI " long " i0 ", long " i1 ,
214 .BI " const char *" file ", unsigned " lno ,
215 .BI " const char *" expr );
216 .ta \w'\fBint TVEC_CLAIMEQ_IENUM('u
217 .BI "int TVEC_CLAIMEQ_IENUM(struct tvec_state *" tv ,
218 .BI " const struct tvec_uenuminfo *" ei ,
219 .BI " long " i0 ", long " i1 );
220 .ta \w'\fBint tvec_claimeq_uenum('u
221 .BI "int tvec_claimeq_uenum(struct tvec_state *" tv ,
222 .BI " const struct tvec_uenuminfo *" ei ,
223 .BI " unsigned long " u0 ", unsigned long " u1 ,
224 .BI " const char *" file ", unsigned " lno ,
225 .BI " const char *" expr );
226 .ta \w'\fBint TVEC_CLAIMEQ_UENUM('u
227 .BI "int TVEC_CLAIMEQ_UENUM(struct tvec_state *" tv ,
228 .BI " const struct tvec_uenuminfo *" ei ,
229 .BI " unsigned long " u0 ", unsigned long " u1 );
230 .ta \w'\fBint tvec_claimeq_fenum('u
231 .BI "int tvec_claimeq_fenum(struct tvec_state *" tv ,
232 .BI " const struct tvec_fenuminfo *" ei ,
233 .BI " double " f0 ", double " f1 ,
234 .BI " const char *" file ", unsigned " lno ,
235 .BI " const char *" expr );
236 .ta \w'\fBint TVEC_CLAIMEQ_FENUM('u
237 .BI "int TVEC_CLAIMEQ_FENUM(struct tvec_state *" tv ,
238 .BI " const struct tvec_fenuminfo *" ei ,
239 .BI " double " f0 ", double " f1 );
240 .ta \w'\fBint tvec_claimeq_penum('u
241 .BI "int tvec_claimeq_penum(struct tvec_state *" tv ,
242 .BI " const struct tvec_penuminfo *" ei ,
243 .BI " const void *" p0 ", const void *" p1 ,
244 .BI " const char *" file ", unsigned " lno ,
245 .BI " const char *" expr );
246 .ta \w'\fBint TVEC_CLAIMEQ_PENUM('u
247 .BI "int TVEC_CLAIMEQ_PENUM(struct tvec_state *" tv ,
248 .BI " const struct tvec_penuminfo *" ei ,
249 .BI " const void *" p0 ", const void *" p1 );
251 .B "const struct tvec_regty tvty_flags;"
253 .B "struct tvec_flag { const char *name; unsigned long m, v; };"
254 .B "#define TVEC_ENDFLAGS ..."
257 .B "struct tvec_flaginfo {"
258 .B " const char *name;"
259 .B " const struct tvec_flag *fv;"
260 .B " const struct tvec_urange *range;"
263 .ta \w'\fBint tvec_claimeq_flags('u
264 .BI "int tvec_claimeq_flags(struct tvec_state *" tv ,
265 .BI " const struct tvec_flaginfo *" fi ,
266 .BI " unsigned long " f0 ", unsigned long " f1 ,
267 .BI " const char *" file ", unsigned " lno ,
268 .BI " const char *" expr );
269 .ta \w'\fBint TVEC_CLAIMEQ_FLAGS('u
270 .BI "int TVEC_CLAIMEQ_UENUM(struct tvec_state *" tv ,
271 .BI " const struct tvec_flaginfo *" fi ,
272 .BI " unsigned long " f0 ", unsigned long " f1 );
274 .B "const struct tvec_regty tvty_char;"
276 .ta \w'\fBint tvec_claimeq_char('u
277 .BI "int tvec_claimeq_char(struct tvec_state *" tv ,
278 .BI " int " ch0 ", int " ch1 ,
279 .BI " const char *" file ", unsigned " lno ,
280 .BI " const char *" expr );
281 .BI "int TVEC_CLAIMEQ_CHAR(struct tvec_state *" tv ", int " ch0 ", int " ch1 );
283 .B "const struct tvec_regty tvty_text, tvty_bytes;"
285 .BI "void tvec_alloctext(union tvec_regval *" rv ", size_t " sz );
286 .BI "void tvec_allocbytes(union tvec_regval *" rv ", size_t " sz );
288 .ta \w'\fBint tvec_claimeq_text('u
289 .BI "int tvec_claimeq_text(struct tvec_state *" tv ,
290 .BI " const char *" p0 ", size_t " sz0 ,
291 .BI " const char *" p1 ", size_t " sz1 ,
292 .BI " const char *" file ", unsigned " lno ,
293 .BI " const char *" expr );
294 .ta \w'\fBint TVEC_CLAIMEQ_TEXT('u
295 .BI "int TVEC_CLAIMEQ_TEXT(struct tvec_state *" tv ,
296 .BI " const char *" p0 ", size_t " sz0 ,
297 .BI " const char *" p1 ", size_t " sz1 );
298 .ta \w'\fBint tvec_claimeq_textz('u
299 .BI "int tvec_claimeq_textz(struct tvec_state *" tv ,
300 .BI " const char *" p0 ", const char *" p1 ,
301 .BI " const char *" file ", unsigned " lno ,
302 .BI " const char *" expr );
303 .ta \w'\fBint TVEC_CLAIMEQ_TEXTZ('u
304 .BI "int TVEC_CLAIMEQ_TEXTZ(struct tvec_state *" tv ,
305 .BI " const char *" p0 " const char *" p1 );
306 .ta \w'\fBint tvec_claimeq_bytes('u
307 .BI "int tvec_claimeq_bytes(struct tvec_state *" tv ,
308 .BI " const void *" p0 ", size_t " sz0 ,
309 .BI " const void *" p1 ", size_t " sz1 ,
310 .BI " const char *" file ", unsigned " lno ,
311 .BI " const char *" expr );
312 .ta \w'\fBint TVEC_CLAIMEQ_BYTES('u
313 .BI "int TVEC_CLAIMEQ_BYTES(struct tvec_state *" tv ,
314 .BI " const void *" p0 ", size_t " sz0 ,
315 .BI " const void *" p1 ", size_t " sz1 );
317 .B "const struct tvec_regty tvty_buffer;"
319 .ta \w'\fBvoid tvec_initbuffer('
320 .BI "void tvec_initbuffer(union tvec_regval *" rv ,
321 .BI " const union tvec_regval *" ref ", size_t " sz );
322 .BI "void tvec_allocbuffer(union tvec_regval *" rv );