From 359d71e90050a8b83f7bc7d2ecd4ff29c477cc22 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 26 Jun 2022 22:51:27 +0200 Subject: Cleanup: rename libfstream to libio, split headers Signed-off-by: David Oberhollenzer --- lib/fstream/printf.c | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 lib/fstream/printf.c (limited to 'lib/fstream/printf.c') diff --git a/lib/fstream/printf.c b/lib/fstream/printf.c deleted file mode 100644 index 3850487..0000000 --- a/lib/fstream/printf.c +++ /dev/null @@ -1,30 +0,0 @@ -/* SPDX-License-Identifier: GPL-3.0-or-later */ -/* - * printf.c - * - * Copyright (C) 2019 David Oberhollenzer - */ -#include "internal.h" - -int ostream_printf(ostream_t *strm, const char *fmt, ...) -{ - char *temp = NULL; - va_list ap; - int ret; - - va_start(ap, fmt); - - ret = vasprintf(&temp, fmt, ap); - if (ret < 0) - perror(strm->get_filename(strm)); - va_end(ap); - - if (ret < 0) - return -1; - - if (strm->append(strm, temp, ret)) - ret = -1; - - free(temp); - return ret; -} -- cgit v1.2.3