Fix RCSID's

Fix gcc warnings.
Add prototypes for functions that were declared in more than one place
to local.h or extern.h and use that instead.
This commit is contained in:
christos 1997-07-13 20:15:17 +00:00
parent 25ec838cfd
commit 0c339c443a
31 changed files with 160 additions and 87 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: perror.c,v 1.9 1997/01/23 14:02:17 mrg Exp $ */
/* $NetBSD: perror.c,v 1.10 1997/07/13 20:15:17 christos Exp $ */
/*
* Copyright (c) 1988, 1993
@ -33,11 +33,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)perror.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: perror.c,v 1.10 1997/07/13 20:15:17 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: perror.c,v 1.9 1997/01/23 14:02:17 mrg Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@ -47,14 +49,14 @@ static char rcsid[] = "$NetBSD: perror.c,v 1.9 1997/01/23 14:02:17 mrg Exp $";
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "extern.h"
/*
* Since perror() is not allowed to change the contents of strerror()'s
* static buffer, both functions supply their own buffers to the
* internal function __strerror().
*/
extern char *__strerror __P((int , char *, int));
void
perror(s)
const char *s;

View File

@ -1,4 +1,4 @@
/* $NetBSD: printf.c,v 1.5 1995/02/02 02:10:13 jtc Exp $ */
/* $NetBSD: printf.c,v 1.6 1997/07/13 20:15:18 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: printf.c,v 1.6 1997/07/13 20:15:18 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: printf.c,v 1.5 1995/02/02 02:10:13 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: putc.c,v 1.5 1996/03/29 23:29:14 jtc Exp $ */
/* $NetBSD: putc.c,v 1.6 1997/07/13 20:15:19 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)putc.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: putc.c,v 1.6 1997/07/13 20:15:19 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: putc.c,v 1.5 1996/03/29 23:29:14 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: putchar.c,v 1.5 1996/03/29 23:29:15 jtc Exp $ */
/* $NetBSD: putchar.c,v 1.6 1997/07/13 20:15:19 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)putchar.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: putchar.c,v 1.6 1997/07/13 20:15:19 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: putchar.c,v 1.5 1996/03/29 23:29:15 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: puts.c,v 1.5 1996/03/29 23:29:16 jtc Exp $ */
/* $NetBSD: puts.c,v 1.6 1997/07/13 20:15:20 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)puts.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: puts.c,v 1.6 1997/07/13 20:15:20 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: puts.c,v 1.5 1996/03/29 23:29:16 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: putw.c,v 1.5 1996/03/29 23:29:17 jtc Exp $ */
/* $NetBSD: putw.c,v 1.6 1997/07/13 20:15:21 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)putw.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: putw.c,v 1.6 1997/07/13 20:15:21 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: putw.c,v 1.5 1996/03/29 23:29:17 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: refill.c,v 1.6 1996/08/13 07:54:00 explorer Exp $ */
/* $NetBSD: refill.c,v 1.7 1997/07/13 20:15:22 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)refill.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: refill.c,v 1.7 1997/07/13 20:15:22 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: refill.c,v 1.6 1996/08/13 07:54:00 explorer Exp $";
#endif /* LIBC_SCCS and not lint */
#include <errno.h>
@ -48,6 +50,8 @@ static char rcsid[] = "$NetBSD: refill.c,v 1.6 1996/08/13 07:54:00 explorer Exp
#include <stdlib.h>
#include "local.h"
static int lflush __P((FILE *));
static int
lflush(fp)
FILE *fp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: remove.c,v 1.6 1997/06/03 22:26:38 kleink Exp $ */
/* $NetBSD: remove.c,v 1.7 1997/07/13 20:15:22 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)remove.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: remove.c,v 1.7 1997/07/13 20:15:22 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: remove.c,v 1.6 1997/06/03 22:26:38 kleink Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: rewind.c,v 1.4 1995/02/02 02:10:25 jtc Exp $ */
/* $NetBSD: rewind.c,v 1.5 1997/07/13 20:15:23 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)rewind.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: rewind.c,v 1.5 1997/07/13 20:15:23 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: rewind.c,v 1.4 1995/02/02 02:10:25 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <errno.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: rget.c,v 1.5 1996/03/29 23:29:20 jtc Exp $ */
/* $NetBSD: rget.c,v 1.6 1997/07/13 20:15:24 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,14 +36,17 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)rget.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: rget.c,v 1.6 1997/07/13 20:15:24 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: rget.c,v 1.5 1996/03/29 23:29:20 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#include "local.h"
/*
* Handle getc() when the buffer ran out:

View File

@ -1,4 +1,4 @@
/* $NetBSD: scanf.c,v 1.5 1996/03/29 23:29:21 jtc Exp $ */
/* $NetBSD: scanf.c,v 1.6 1997/07/13 20:15:24 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)scanf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: scanf.c,v 1.6 1997/07/13 20:15:24 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: scanf.c,v 1.5 1996/03/29 23:29:21 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: setbuf.c,v 1.4 1995/02/02 02:10:30 jtc Exp $ */
/* $NetBSD: setbuf.c,v 1.5 1997/07/13 20:15:25 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)setbuf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: setbuf.c,v 1.5 1997/07/13 20:15:25 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: setbuf.c,v 1.4 1995/02/02 02:10:30 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: setbuffer.c,v 1.4 1995/02/02 02:10:32 jtc Exp $ */
/* $NetBSD: setbuffer.c,v 1.5 1997/07/13 20:15:26 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)setbuffer.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: setbuffer.c,v 1.5 1997/07/13 20:15:26 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: setbuffer.c,v 1.4 1995/02/02 02:10:32 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: setvbuf.c,v 1.8 1996/03/29 23:29:22 jtc Exp $ */
/* $NetBSD: setvbuf.c,v 1.9 1997/07/13 20:15:27 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)setvbuf.c 8.2 (Berkeley) 11/16/93";
#else
__RCSID("$NetBSD: setvbuf.c,v 1.9 1997/07/13 20:15:27 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: setvbuf.c,v 1.8 1996/03/29 23:29:22 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: snprintf.c,v 1.5 1996/03/29 23:29:24 jtc Exp $ */
/* $NetBSD: snprintf.c,v 1.6 1997/07/13 20:15:28 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: snprintf.c,v 1.6 1997/07/13 20:15:28 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: snprintf.c,v 1.5 1996/03/29 23:29:24 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sprintf.c,v 1.5 1995/02/02 02:10:37 jtc Exp $ */
/* $NetBSD: sprintf.c,v 1.6 1997/07/13 20:15:29 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)sprintf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: sprintf.c,v 1.6 1997/07/13 20:15:29 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: sprintf.c,v 1.5 1995/02/02 02:10:37 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sscanf.c,v 1.7 1996/03/29 23:29:25 jtc Exp $ */
/* $NetBSD: sscanf.c,v 1.8 1997/07/13 20:15:29 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)sscanf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: sscanf.c,v 1.8 1997/07/13 20:15:29 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: sscanf.c,v 1.7 1996/03/29 23:29:25 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@ -52,6 +54,8 @@ static char rcsid[] = "$NetBSD: sscanf.c,v 1.7 1996/03/29 23:29:25 jtc Exp $";
#endif
#include "local.h"
static int eofread __P((void *, char *, int));
/* ARGSUSED */
static int
eofread(cookie, buf, len)

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdio.c,v 1.5 1996/03/29 23:29:25 jtc Exp $ */
/* $NetBSD: stdio.c,v 1.6 1997/07/13 20:15:30 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)stdio.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: stdio.c,v 1.6 1997/07/13 20:15:30 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: stdio.c,v 1.5 1996/03/29 23:29:25 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <fcntl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: tempnam.c,v 1.8 1997/07/07 17:47:01 phil Exp $ */
/* $NetBSD: tempnam.c,v 1.9 1997/07/13 20:15:31 christos Exp $ */
/*
* Copyright (c) 1988, 1993
@ -33,11 +33,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)tempnam.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: tempnam.c,v 1.9 1997/07/13 20:15:31 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: tempnam.c,v 1.8 1997/07/07 17:47:01 phil Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -47,8 +49,7 @@ static char rcsid[] = "$NetBSD: tempnam.c,v 1.8 1997/07/07 17:47:01 phil Exp $";
#include <string.h>
#include <unistd.h>
#include <paths.h>
extern char *_mktemp __P((char *));
#include "local.h"
__warn_references(tempnam,
"warning: tempnam() possibly used unsafely, consider using mkstemp()");
@ -66,28 +67,28 @@ tempnam(dir, pfx)
if (!pfx)
pfx = "tmp.";
if (f = getenv("TMPDIR")) {
if ((f = getenv("TMPDIR")) != NULL) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
if (f = _mktemp(name))
if ((f = _mktemp(name)) != NULL)
return(f);
}
if (f = (char *)dir) {
if ((f = (char *)dir) != NULL) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
if (f = _mktemp(name))
if ((f = _mktemp(name)) != NULL)
return(f);
}
f = P_tmpdir;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXXX", f, pfx);
if (f = _mktemp(name))
if ((f = _mktemp(name)) != NULL)
return(f);
f = _PATH_TMP;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXXX", f, pfx);
if (f = _mktemp(name))
if ((f = _mktemp(name)) != NULL)
return(f);
sverrno = errno;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tmpfile.c,v 1.5 1995/02/02 02:10:43 jtc Exp $ */
/* $NetBSD: tmpfile.c,v 1.6 1997/07/13 20:15:31 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)tmpfile.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: tmpfile.c,v 1.6 1997/07/13 20:15:31 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: tmpfile.c,v 1.5 1995/02/02 02:10:43 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: tmpnam.c,v 1.7 1997/03/16 05:00:40 lukem Exp $ */
/* $NetBSD: tmpnam.c,v 1.8 1997/07/13 20:15:32 christos Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@ -36,19 +36,20 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)tmpnam.c 8.3 (Berkeley) 3/28/94";
#else
__RCSID("$NetBSD: tmpnam.c,v 1.8 1997/07/13 20:15:32 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: tmpnam.c,v 1.7 1997/03/16 05:00:40 lukem Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
extern char *_mktemp __P((char *));
#include "local.h"
__warn_references(tmpnam,
"warning: tmpnam() possibly used unsafely, consider using mkstemp()");

View File

@ -1,4 +1,4 @@
/* $NetBSD: ungetc.c,v 1.5 1996/03/29 23:29:27 jtc Exp $ */
/* $NetBSD: ungetc.c,v 1.6 1997/07/13 20:15:33 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)ungetc.c 8.2 (Berkeley) 11/3/93";
#else
__RCSID("$NetBSD: ungetc.c,v 1.6 1997/07/13 20:15:33 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: ungetc.c,v 1.5 1996/03/29 23:29:27 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@ -48,6 +50,7 @@ static char rcsid[] = "$NetBSD: ungetc.c,v 1.5 1996/03/29 23:29:27 jtc Exp $";
#include <string.h>
#include "local.h"
static int __submore __P((FILE *));
/*
* Expand the ungetc buffer `in place'. That is, adjust fp->_p when
* the buffer moves, so that it points the same distance from the end,

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfprintf.c,v 1.19 1997/05/03 09:01:50 kleink Exp $ */
/* $NetBSD: vfprintf.c,v 1.20 1997/07/13 20:15:34 christos Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -36,9 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
static char *rcsid = "$NetBSD: vfprintf.c,v 1.19 1997/05/03 09:01:50 kleink Exp $";
#if 0
static char *sccsid = "@(#)vfprintf.c 5.50 (Berkeley) 12/16/92";
#else
__RCSID("$NetBSD: vfprintf.c,v 1.20 1997/07/13 20:15:34 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
/*
@ -62,6 +66,10 @@ static char *rcsid = "$NetBSD: vfprintf.c,v 1.19 1997/05/03 09:01:50 kleink Exp
#include "local.h"
#include "fvwrite.h"
#include "extern.h"
static int __sprint __P((FILE *, struct __suio *));
static int __sbprintf __P((FILE *, const char *, va_list));
/*
* Flush out all the vectors defined by the given uio,
@ -177,9 +185,9 @@ vfprintf(fp, fmt0, ap)
#ifdef FLOATING_POINT
char *decimal_point = localeconv()->decimal_point;
char softsign; /* temporary negative sign for floats */
double _double; /* double precision arguments %[eEfgG] */
double _double = 0; /* double precision arguments %[eEfgG] */
int expt; /* integer value of exponent */
int expsize; /* character count for expstr */
int expsize = 0; /* character count for expstr */
int ndig; /* actual number of digits returned by cvt */
char expstr[7]; /* buffer for exponent string */
#endif
@ -194,7 +202,7 @@ vfprintf(fp, fmt0, ap)
int dprec; /* a copy of prec if [diouxX], 0 otherwise */
int realsz; /* field size expanded by dprec */
int size; /* size of converted field or string */
char *xdigs; /* digits for [xX] conversion */
char *xdigs = NULL; /* digits for [xX] conversion */
#define NIOV 8
struct __suio uio; /* output information: summary */
struct __siov iov[NIOV];/* ... and individual io vectors */
@ -677,7 +685,7 @@ number: if ((dprec = prec) >= 0)
ox[0] = *cp++;
ox[1] = '.';
PRINT(ox, 2);
if (_double || flags & ALT == 0) {
if (_double || (flags & ALT) == 0) {
PRINT(cp, ndig-1);
} else /* 0.[0..] */
/* __dtoa irregularity */
@ -708,8 +716,6 @@ error:
#ifdef FLOATING_POINT
extern char *__dtoa __P((double, int, int, int *, int *, char **));
static char *
cvt(value, ndigits, flags, sign, decpt, ch, length)
double value;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfscanf.c,v 1.15 1996/03/29 23:29:28 jtc Exp $ */
/* $NetBSD: vfscanf.c,v 1.16 1997/07/13 20:15:35 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,13 +36,16 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vfscanf.c,v 1.16 1997/07/13 20:15:35 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: vfscanf.c,v 1.15 1996/03/29 23:29:28 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@ -96,7 +99,7 @@ static char rcsid[] = "$NetBSD: vfscanf.c,v 1.15 1996/03/29 23:29:28 jtc Exp $";
#define u_char unsigned char
#define u_long unsigned long
static u_char *__sccl();
static u_char *__sccl __P((char *, u_char *));
/*
* vfscanf
@ -117,7 +120,8 @@ __svfscanf(fp, fmt0, ap)
int nassigned; /* number of fields assigned */
int nread; /* number of characters consumed from fp */
int base; /* base argument to strtoq/strtouq */
u_quad_t (*ccfn)(); /* conversion function (strtoq/strtouq) */
u_quad_t (*ccfn) __P((const char *, char **, int));
/* conversion function (strtoq/strtouq) */
char ccltab[256]; /* character class table for %[...] */
char buf[BUF]; /* buffer for numeric conversions */
@ -201,13 +205,13 @@ literal:
/* FALLTHROUGH */
case 'd':
c = CT_INT;
ccfn = (u_quad_t (*)())strtoq;
ccfn = (u_quad_t (*) __P((const char *, char **, int)))strtoq;
base = 10;
break;
case 'i':
c = CT_INT;
ccfn = (u_quad_t (*)())strtoq;
ccfn = (u_quad_t (*) __P((const char *, char **, int)))strtoq;
base = 0;
break;
@ -287,7 +291,7 @@ literal:
if (isupper(c))
flags |= LONG;
c = CT_INT;
ccfn = (u_quad_t (*)())strtoq;
ccfn = (u_quad_t (*) __P((const char *, char **, int)))strtoq;
base = 10;
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: vprintf.c,v 1.6 1996/03/29 23:29:29 jtc Exp $ */
/* $NetBSD: vprintf.c,v 1.7 1997/07/13 20:15:36 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)vprintf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vprintf.c,v 1.7 1997/07/13 20:15:36 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: vprintf.c,v 1.6 1996/03/29 23:29:29 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: vscanf.c,v 1.6 1996/03/29 23:29:30 jtc Exp $ */
/* $NetBSD: vscanf.c,v 1.7 1997/07/13 20:15:36 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)vscanf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vscanf.c,v 1.7 1997/07/13 20:15:36 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: vscanf.c,v 1.6 1996/03/29 23:29:30 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: vsnprintf.c,v 1.6 1996/03/29 23:29:31 jtc Exp $ */
/* $NetBSD: vsnprintf.c,v 1.7 1997/07/13 20:15:37 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)vsnprintf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vsnprintf.c,v 1.7 1997/07/13 20:15:37 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: vsnprintf.c,v 1.6 1996/03/29 23:29:31 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: vsprintf.c,v 1.6 1996/03/29 23:29:32 jtc Exp $ */
/* $NetBSD: vsprintf.c,v 1.7 1997/07/13 20:15:38 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)vsprintf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vsprintf.c,v 1.7 1997/07/13 20:15:38 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: vsprintf.c,v 1.6 1996/03/29 23:29:32 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: vsscanf.c,v 1.6 1996/03/29 23:29:33 jtc Exp $ */
/* $NetBSD: vsscanf.c,v 1.7 1997/07/13 20:15:38 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,16 +36,20 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)vsscanf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: vsscanf.c,v 1.7 1997/07/13 20:15:38 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: vsscanf.c,v 1.6 1996/03/29 23:29:33 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#include <string.h>
static int eofread __P((void *, char *, int));
/* ARGSUSED */
static int
eofread(cookie, buf, len)
@ -62,7 +66,6 @@ vsscanf(str, fmt, ap)
const char *fmt;
_BSD_VA_LIST_ ap;
{
int ret;
FILE f;
f._flags = __SRD;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wbuf.c,v 1.6 1997/05/03 09:01:52 kleink Exp $ */
/* $NetBSD: wbuf.c,v 1.7 1997/07/13 20:15:39 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)wbuf.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: wbuf.c,v 1.7 1997/07/13 20:15:39 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: wbuf.c,v 1.6 1997/05/03 09:01:52 kleink Exp $";
#endif /* LIBC_SCCS and not lint */
#include <errno.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsetup.c,v 1.5 1996/03/29 23:29:35 jtc Exp $ */
/* $NetBSD: wsetup.c,v 1.6 1997/07/13 20:15:40 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -36,11 +36,13 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)wsetup.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: wsetup.c,v 1.6 1997/07/13 20:15:40 christos Exp $");
#endif
static char rcsid[] = "$NetBSD: wsetup.c,v 1.5 1996/03/29 23:29:35 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>