Welcome to little lamb

Code » limb » release » tree

[release] / src / liblimb / obuffer.h / obuffer_putmsg.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/obuffer.h>

void
obuffer_putmsg(obuffer *obuf, u8 level, const char * const *as, unsigned int n)
{
    obuffer *ref = obuf;
    do {
        if (level <= obuf->lvl)
            buffer_putmsg(obuf->b, as, n);
        obuf = obuf->n;
    } while (obuf && obuf != ref);
}