.\" -*-nroff-*- .\" .\" Manual for test-vector framework types .\" .\" (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-types 3mLib "11 March 2024" "Straylight/Edgeware" "mLib utilities library" .\" @tvty_int .\" @tvty_uint .\" @tvty_float .\" @tvty_duration .\" @tvty_ienum .\" @tvty_uenum .\" @tvty_fenum .\" @tvty_penum .\" @tvty_flags .\" @tvty_char .\" @tvty_text .\" @tvty_bytes .\" @tvty_buffer . .\" @tvrange_schar .\" @tvrange_short .\" @tvrange_int .\" @tvrange_long .\" @tvrange_sbyte .\" @tvrange_i16 .\" @tvrange_i32 .\" @tvrange_uchar .\" @tvrange_ushort .\" @tvrange_uint .\" @tvrange_ulong .\" @tvrange_size .\" @tvrange_byte .\" @tvrange_u16 .\" @tvrange_u32 . .\" @tvflt_finite .\" @tvflt_nonneg . .\" @tvenum_bool .\" @tvenum_cmp . .\" @tvec_claimeq_int .\" @tvec_claimeq_uint .\" @tvec_claimeqish_float .\" @tvec_claimeq_float .\" @tvec_claimeq_ienum .\" @tvec_claimeq_uenum .\" @tvec_claimeq_fenum .\" @tvec_claimeq_penum .\" @tvec_claimeq_flags .\" @tvec_claimeq_char .\" @tvec_claimeq_text .\" @tvec_claimeq_textz .\" @tvec_claimeq_bytes .\" @TVEC_CLAIMEQ_INT .\" @TVEC_CLAIMEQ_UINT .\" @TVEC_CLAIMEQISH_FLOAT .\" @TVEC_CLAIMEQ_FLOAT .\" @TVEC_CLAIMEQ_IENUM .\" @TVEC_CLAIMEQ_UENUM .\" @TVEC_CLAIMEQ_FENUM .\" @TVEC_CLAIMEQ_PENUM .\" @TVEC_CLAIMEQ_FLAGS .\" @TVEC_CLAIMEQ_CHAR .\" @TVEC_CLAIMEQ_TEXT .\" @TVEC_CLAIMEQ_TEXTZ .\" @TVEC_CLAIMEQ_BYTES . .\" @tvec_parsedurunit .\" @tvec_alloctext .\" @tvec_allocbytes .\" @tvec_initbuffer .\" @tvec_allocbuffer . .\"-------------------------------------------------------------------------- .SH NAME tvec-types \- test vector framework provided register types . .\"-------------------------------------------------------------------------- .SH SYNOPSIS . .nf .B "#include " .PP .B "const struct tvec_regty tvty_int, tvty_uint;" .PP .B "struct tvec_irange { long min, max; };" .B "struct tvec_urange { unsigned long min, max; };" .PP .ta 2n .B "const struct tvec_irange" .B " tvrange_schar, tvrange_short, tvrange_int, tvrange_long," .B " tvrange_sbyte, tvrange_i16, tvrange_i32;" .B "const struct tvec_urange" .B " tvrange_uchar, tvrange_ushort, tvrange_uint," .B " tvrange_ulong, tvrange_size," .B " tvrange_byte, tvrange_u16, tvrange_u32;" .PP .ta \w'\fBint tvec_claimeq_int('u .BI "int tvec_claimeq_int(struct tvec_state *" tv , .BI " long " i0 ", long " i1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .BI "int TVEC_CLAIMEQ_INT(struct tvec_state *" tv ", long " i0 ", long " i1 ); .ta \w'\fBint tvec_claimeq_uint('u .BI "int tvec_claimeq_uint(struct tvec_state *" tv , .BI " unsigned long " u0 ", unsigned long " u1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_UINT('u .BI "int TVEC_CLAIMEQ_UINT(struct tvec_state *" tv , .BI " unsigned long " u0 ", unsigned long " u1 ); .PP .B "const struct tvec_regty tvty_size;" .PP .ta \w'\fBint tvec_claimeq_size('u .BI "int tvec_claimeq_size(struct tvec_state *" tv , .BI " unsigned long " sz0 ", unsigned long " sz1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_SIZE('u .BI "int TVEC_CLAIMEQ_UINT(struct tvec_state *" tv , .BI " unsigned long " sz0 ", unsigned long " sz1 ); .PP .B "const struct tvec_regty tvty_float;" .PP .ta 2n .B "struct tvec_floatinfo {" .B " unsigned f;" .B " double min, max;" .B " double delta;" .B "};" .B "#define TVFF_NOMIN ..." .B "#define TVFF_NOMAX ..." .B "#define TVFF_NANOK ..." .B "#define TVFF_EQMASK ..." .B "#define TVFF_EXACT ..." .B "#define TVFF_ABSDELTA ..." .B "#define TVFF_RELDELTA ..." .PP .B "const struct tvec_floatinfo tvflt_finite, tvflt_nonneg;" .PP .ta \w'\fBint tvec_claimeqish_float('u .BI "int tvec_claimeqish_float(struct tvec_state *" tv , .BI " double " f0 ", double " f1 , .BI " unsigned " f ", double " delta , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQISH_FLOAT('u .BI "int TVEC_CLAIMEQISH_FLOAT(struct tvec_state *" tv , .BI " double " f0 ", double " f1 , .BI " unsigned " f ", double " delta ); .ta \w'\fBint tvec_claimeq_float('u .BI "int tvec_claimeq_float(struct tvec_state *" tv , .BI " double " f0 ", double " f1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_FLOAT('u .BI "int TVEC_CLAIMEQ_FLOAT(struct tvec_state *" tv , .BI " double " f0 ", double " f1 ); .PP .B "const struct tvec_regty tvty_duration;" .PP .BI "int tvec_parsedurunit(double *" scale_out ", const char **" p_inout ); .PP .ta \w'\fBint tvec_claimeqish_duration('u .BI "int tvec_claimeqish_duration(struct tvec_state *" tv , .BI " double " t0 ", double " t1 , .BI " unsigned " f ", double " delta , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQISH_DURATION('u .BI "int TVEC_CLAIMEQISH_DURATION(struct tvec_state *" tv , .BI " double " t0 ", double " t1 , .BI " unsigned " f ", double " delta ); .ta \w'\fBint tvec_claimeq_duration('u .BI "int tvec_claimeq_duration(struct tvec_state *" tv , .BI " double " t0 ", double " t1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_DURATION('u .BI "int TVEC_CLAIMEQ_DURATION(struct tvec_state *" tv , .BI " double " t0 ", double " t1 ); .PP .B "const struct tvec_regty tvty_ienum, tvty_uenum, tvty_fenum, tvty_penum;" .PP .B "struct tvec_iassoc { const char *tag; long i; };" .B "struct tvec_uassoc { const char *tag; unsigned long u; };" .B "struct tvec_fassoc { const char *tag; double f; };" .B "struct tvec_passoc { const char *tag; void *p; };" .B "#define TVEC_ENDENUM ..." .PP .ta 2n .B "struct tvec_ienuminfo {" .B " const char *name;" .B " const struct tvec_iassoc *av;" .B " const struct tvec_irange *ir;" .B "};" .B "struct tvec_uenuminfo {" .B " const char *name;" .B " const struct tvec_uassoc *av;" .B " const struct tvec_urange *ur;" .B "};" .B "struct tvec_fenuminfo {" .B " const char *name;" .B " const struct tvec_fassoc *av;" .B " const struct tvec_floatinfo *fi;" .B "};" .B "struct tvec_penuminfo {" .B " const char *name;" .B " const struct tvec_passoc *av;" .B "};" .B "const struct tvec_ienuminfo tvenum_bool;" .B "const struct tvec_ienuminfo tvenum_cmp;" .PP .ta \w'\fBint tvec_claimeq_ienum('u .BI "int tvec_claimeq_ienum(struct tvec_state *" tv , .BI " const struct tvec_uenuminfo *" ei , .BI " long " i0 ", long " i1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_IENUM('u .BI "int TVEC_CLAIMEQ_IENUM(struct tvec_state *" tv , .BI " const struct tvec_uenuminfo *" ei , .BI " long " i0 ", long " i1 ); .ta \w'\fBint tvec_claimeq_uenum('u .BI "int tvec_claimeq_uenum(struct tvec_state *" tv , .BI " const struct tvec_uenuminfo *" ei , .BI " unsigned long " u0 ", unsigned long " u1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_UENUM('u .BI "int TVEC_CLAIMEQ_UENUM(struct tvec_state *" tv , .BI " const struct tvec_uenuminfo *" ei , .BI " unsigned long " u0 ", unsigned long " u1 ); .ta \w'\fBint tvec_claimeq_fenum('u .BI "int tvec_claimeq_fenum(struct tvec_state *" tv , .BI " const struct tvec_fenuminfo *" ei , .BI " double " f0 ", double " f1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_FENUM('u .BI "int TVEC_CLAIMEQ_FENUM(struct tvec_state *" tv , .BI " const struct tvec_fenuminfo *" ei , .BI " double " f0 ", double " f1 ); .ta \w'\fBint tvec_claimeq_penum('u .BI "int tvec_claimeq_penum(struct tvec_state *" tv , .BI " const struct tvec_penuminfo *" ei , .BI " const void *" p0 ", const void *" p1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_PENUM('u .BI "int TVEC_CLAIMEQ_PENUM(struct tvec_state *" tv , .BI " const struct tvec_penuminfo *" ei , .BI " const void *" p0 ", const void *" p1 ); .PP .B "const struct tvec_regty tvty_flags;" .PP .B "struct tvec_flag { const char *name; unsigned long m, v; };" .B "#define TVEC_ENDFLAGS ..." .PP .ta 2n .B "struct tvec_flaginfo {" .B " const char *name;" .B " const struct tvec_flag *fv;" .B " const struct tvec_urange *range;" .B "};" .PP .ta \w'\fBint tvec_claimeq_flags('u .BI "int tvec_claimeq_flags(struct tvec_state *" tv , .BI " const struct tvec_flaginfo *" fi , .BI " unsigned long " f0 ", unsigned long " f1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_FLAGS('u .BI "int TVEC_CLAIMEQ_UENUM(struct tvec_state *" tv , .BI " const struct tvec_flaginfo *" fi , .BI " unsigned long " f0 ", unsigned long " f1 ); .PP .B "const struct tvec_regty tvty_char;" .PP .ta \w'\fBint tvec_claimeq_char('u .BI "int tvec_claimeq_char(struct tvec_state *" tv , .BI " int " ch0 ", int " ch1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .BI "int TVEC_CLAIMEQ_CHAR(struct tvec_state *" tv ", int " ch0 ", int " ch1 ); .PP .B "const struct tvec_regty tvty_text, tvty_bytes;" .PP .BI "void tvec_alloctext(union tvec_regval *" rv ", size_t " sz ); .BI "void tvec_allocbytes(union tvec_regval *" rv ", size_t " sz ); .PP .ta \w'\fBint tvec_claimeq_text('u .BI "int tvec_claimeq_text(struct tvec_state *" tv , .BI " const char *" p0 ", size_t " sz0 , .BI " const char *" p1 ", size_t " sz1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_TEXT('u .BI "int TVEC_CLAIMEQ_TEXT(struct tvec_state *" tv , .BI " const char *" p0 ", size_t " sz0 , .BI " const char *" p1 ", size_t " sz1 ); .ta \w'\fBint tvec_claimeq_textz('u .BI "int tvec_claimeq_textz(struct tvec_state *" tv , .BI " const char *" p0 ", const char *" p1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_TEXTZ('u .BI "int TVEC_CLAIMEQ_TEXTZ(struct tvec_state *" tv , .BI " const char *" p0 " const char *" p1 ); .ta \w'\fBint tvec_claimeq_bytes('u .BI "int tvec_claimeq_bytes(struct tvec_state *" tv , .BI " const void *" p0 ", size_t " sz0 , .BI " const void *" p1 ", size_t " sz1 , .BI " const char *" file ", unsigned " lno , .BI " const char *" expr ); .ta \w'\fBint TVEC_CLAIMEQ_BYTES('u .BI "int TVEC_CLAIMEQ_BYTES(struct tvec_state *" tv , .BI " const void *" p0 ", size_t " sz0 , .BI " const void *" p1 ", size_t " sz1 ); .PP .B "const struct tvec_regty tvty_buffer;" .PP .ta \w'\fBvoid tvec_initbuffer(' .BI "void tvec_initbuffer(union tvec_regval *" rv , .BI " const union tvec_regval *" ref ", size_t " sz ); .BI "void tvec_allocbuffer(union tvec_regval *" rv ); .fi