Welcome to little lamb

Code » limb » master » tree

[master] / src / liblimb / siovec.h / siov_seek_bytechr.c

/* This file is part of limb                           https://lila.oss/limb
 * Copyright (C) 2023 Olivier Brunel                          jjk@jjacky.com */
/* SPDX-License-Identifier: GPL-2.0-only */
#include <limb/siovec.h>

size_t
siov_seek_bytechr(const struct iovec *v, unsigned int n, size_t offset, char c)
{
    struct iovec vv[n];

    for (unsigned int i = 0; i < n; ++i)
        vv[i] = v[i];

    siov_seek(vv, n, offset);
    return siov_bytechr(vv, n, c);
}