Welcome to little lamb

Code » limb » release » tree

[release] / src / liblimb / buffer.h / buffer_putesc.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 <errno.h>
#include <limb/buffer.h>

ssize_t
buffer_putesc(buffer *b, const char *s, size_t len)
{
    size_t w, r = 0;
    if (!buffer_putescall(b, s, len, &w, &r))
        return -1;
    return w;
}