diff options
Diffstat (limited to 'src/libstddjb/siovec_len.c')
-rw-r--r-- | src/libstddjb/siovec_len.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstddjb/siovec_len.c b/src/libstddjb/siovec_len.c new file mode 100644 index 0000000..5d53e53 --- /dev/null +++ b/src/libstddjb/siovec_len.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/siovec.h> + +unsigned int siovec_len (siovec_t const *v, register unsigned int n) +{ + register unsigned int w = 0 ; + while (n--) w += v[n].len ; + return w ; +} |