From 566f139cffdcef5d1ce679cc1a7cfd0c7cde3f78 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Fri, 28 Nov 2014 17:35:44 +1100 Subject: Remove vsprintf: just like sprintf, vsnprintf is a much better idea Signed-off-by: Stewart Smith --- libc/include/stdio.h | 1 - libc/stdio/Makefile.inc | 2 +- libc/stdio/vsprintf.c | 19 ------------------- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 libc/stdio/vsprintf.c (limited to 'libc') diff --git a/libc/include/stdio.h b/libc/include/stdio.h index 6dd82c3..787c06b 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -44,7 +44,6 @@ int printf(const char *format, ...) __attribute__((format (printf, 1, 2))); int fprintf(FILE *stream, const char *format, ...) __attribute__((format (printf, 2, 3))); int snprintf(char *str, size_t size, const char *format, ...) __attribute__((format (printf, 3, 4))); int vfprintf(FILE *stream, const char *format, va_list); -int vsprintf(char *str, const char *format, va_list); int vsnprintf(char *str, size_t size, const char *format, va_list); void setbuf(FILE *stream, char *buf); int setvbuf(FILE *stream, char *buf, int mode , size_t size); diff --git a/libc/stdio/Makefile.inc b/libc/stdio/Makefile.inc index 025ee01..7c3cb08 100644 --- a/libc/stdio/Makefile.inc +++ b/libc/stdio/Makefile.inc @@ -13,7 +13,7 @@ SUBDIRS += $(LIBCDIR)/stdio -STDIO_OBJS = fscanf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \ +STDIO_OBJS = fscanf.o vfprintf.o vsnprintf.o fprintf.o \ setvbuf.o fputc.o puts.o fputs.o putchar.o scanf.o \ stdchnls.o vfscanf.o vsscanf.o fileno.o snprintf.o diff --git a/libc/stdio/vsprintf.c b/libc/stdio/vsprintf.c deleted file mode 100644 index 0dfd737..0000000 --- a/libc/stdio/vsprintf.c +++ /dev/null @@ -1,19 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2004, 2008 IBM Corporation - * All rights reserved. - * This program and the accompanying materials - * are made available under the terms of the BSD License - * which accompanies this distribution, and is available at - * http://www.opensource.org/licenses/bsd-license.php - * - * Contributors: - * IBM Corporation - initial implementation - *****************************************************************************/ - -#include "stdio.h" - -int -vsprintf(char *buffer, const char *format, va_list arg) -{ - return vsnprintf(buffer, 0x7fffffff, format, arg); -} -- cgit v1.1