Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libsa Remove {v,}sprintf
details: https://anonhg.NetBSD.org/src/rev/aebcaa082b99
branches: trunk
changeset: 328116:aebcaa082b99
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 26 18:02:24 2014 +0000
description:
Remove {v,}sprintf
diffstat:
sys/lib/libsa/Makefile | 6 ++--
sys/lib/libsa/sprintf.c | 49 ------------------------------------------------
sys/lib/libsa/stand.h | 8 +------
sys/lib/libsa/vsprintf.c | 44 -------------------------------------------
4 files changed, 4 insertions(+), 103 deletions(-)
diffs (155 lines):
diff -r a7bfd04c0c82 -r aebcaa082b99 sys/lib/libsa/Makefile
--- a/sys/lib/libsa/Makefile Wed Mar 26 17:58:57 2014 +0000
+++ b/sys/lib/libsa/Makefile Wed Mar 26 18:02:24 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.80 2014/01/12 15:19:57 tsutsui Exp $
+# $NetBSD: Makefile,v 1.81 2014/03/26 18:02:24 christos Exp $
LIB= sa
LIBISPRIVATE?= yes
@@ -25,8 +25,8 @@
# stand routines
SRCS+= alloc.c errno.c exit.c files.c \
getfile.c gets.c globals.c \
- panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
- subr_prf.c twiddle.c vsprintf.c checkpasswd.c
+ panic.c printf.c qsort.c snprintf.c strerror.c \
+ subr_prf.c twiddle.c checkpasswd.c
# string routines
.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
diff -r a7bfd04c0c82 -r aebcaa082b99 sys/lib/libsa/sprintf.c
--- a/sys/lib/libsa/sprintf.c Wed Mar 26 17:58:57 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/* $NetBSD: sprintf.c,v 1.5 2011/07/17 20:54:52 joerg Exp $ */
-
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)printf.c 8.1 (Berkeley) 6/11/93
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include "stand.h"
-
-int
-sprintf(char *buf, const char *fmt, ...)
-{
- va_list ap;
- int len;
-
- va_start(ap, fmt);
- len = vsnprintf(buf, -(size_t)buf, fmt, ap);
- va_end(ap);
- return len;
-}
diff -r a7bfd04c0c82 -r aebcaa082b99 sys/lib/libsa/stand.h
--- a/sys/lib/libsa/stand.h Wed Mar 26 17:58:57 2014 +0000
+++ b/sys/lib/libsa/stand.h Wed Mar 26 18:02:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stand.h,v 1.77 2014/01/05 21:38:25 jakllsch Exp $ */
+/* $NetBSD: stand.h,v 1.78 2014/03/26 18:02:24 christos Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -80,9 +80,7 @@
#define gets libsa_gets
#define printf libsa_printf
#define putchar libsa_putchar
-#define sprintf libsa_sprintf
#define vprintf libsa_vprintf
-#define vsprintf libsa_vsprintf
#endif
struct open_file;
@@ -252,14 +250,10 @@
void printf(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
-int sprintf(char *, const char *, ...)
- __attribute__((__format__(__printf__, 2, 3)));
int snprintf(char *, size_t, const char *, ...)
__attribute__((__format__(__printf__, 3, 4)));
void vprintf(const char *, va_list)
__attribute__((__format__(__printf__, 1, 0)));
-int vsprintf(char *, const char *, va_list)
- __attribute__((__format__(__printf__, 2, 0)));
int vsnprintf(char *, size_t, const char *, va_list)
__attribute__((__format__(__printf__, 3, 0)));
void twiddle(void);
diff -r a7bfd04c0c82 -r aebcaa082b99 sys/lib/libsa/vsprintf.c
--- a/sys/lib/libsa/vsprintf.c Wed Mar 26 17:58:57 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/* $NetBSD: vsprintf.c,v 1.5 2011/07/17 20:54:52 joerg Exp $ */
-
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)printf.c 8.1 (Berkeley) 6/11/93
- */
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include "stand.h"
-
-int
-vsprintf(char *buf, const char *fmt, va_list ap)
-{
-
- return vsnprintf(buf, -(size_t)buf, fmt, ap);
-}
Home |
Main Index |
Thread Index |
Old Index