diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-06-13 22:19:05 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-06-13 22:19:05 +0000 |
commit | 193a7be520502f24e995b71768dd89c37b3776eb (patch) | |
tree | 29a1d10e1e74220c9d0d463bbcb03aa7c1954583 /src/libstddjb/tain_earliestv.c | |
parent | 8fac1ec21fc54a050822258d8873b9a87a2bd2fe (diff) | |
download | skalibs-193a7be520502f24e995b71768dd89c37b3776eb.tar.xz |
Fix iter_func type; add tain_earliest
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb/tain_earliestv.c')
-rw-r--r-- | src/libstddjb/tain_earliestv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstddjb/tain_earliestv.c b/src/libstddjb/tain_earliestv.c new file mode 100644 index 0000000..f4fd36b --- /dev/null +++ b/src/libstddjb/tain_earliestv.c @@ -0,0 +1,9 @@ +/* ISC license. */ + +#include <skalibs/tai.h> + +void tain_earliestv (tain *t, tain const *const *v, unsigned int n) +{ + for (unsigned int i = 0 ; i < n ; i++) + if (tain_less(v[i], t)) *t = *v[i] ; +} |