svn commit: r249810 - head/lib/libc/stdio

Ed Maste emaste at FreeBSD.org
Tue Apr 23 14:36:51 UTC 2013


Author: emaste
Date: Tue Apr 23 14:36:44 2013
New Revision: 249810
URL: http://svnweb.freebsd.org/changeset/base/249810

Log:
  Convert libc/stdio from K&R to ANSI C
  
  And add '__restrict' where it appeared in the header prototypes

Modified:
  head/lib/libc/stdio/clrerr.c
  head/lib/libc/stdio/fdopen.c
  head/lib/libc/stdio/fgetc.c
  head/lib/libc/stdio/fgets.c
  head/lib/libc/stdio/findfp.c
  head/lib/libc/stdio/flags.c
  head/lib/libc/stdio/fopen.c
  head/lib/libc/stdio/fpurge.c
  head/lib/libc/stdio/fputc.c
  head/lib/libc/stdio/fputs.c
  head/lib/libc/stdio/freopen.c
  head/lib/libc/stdio/fseek.c
  head/lib/libc/stdio/fsetpos.c
  head/lib/libc/stdio/ftell.c
  head/lib/libc/stdio/fvwrite.c
  head/lib/libc/stdio/fwalk.c
  head/lib/libc/stdio/fwrite.c
  head/lib/libc/stdio/gets.c
  head/lib/libc/stdio/getw.c
  head/lib/libc/stdio/makebuf.c
  head/lib/libc/stdio/mktemp.c
  head/lib/libc/stdio/perror.c
  head/lib/libc/stdio/putc.c
  head/lib/libc/stdio/putchar.c
  head/lib/libc/stdio/puts.c
  head/lib/libc/stdio/putw.c
  head/lib/libc/stdio/remove.c
  head/lib/libc/stdio/setbuffer.c
  head/lib/libc/stdio/stdio.c
  head/lib/libc/stdio/tempnam.c
  head/lib/libc/stdio/tmpnam.c
  head/lib/libc/stdio/vscanf.c
  head/lib/libc/stdio/wbuf.c
  head/lib/libc/stdio/wsetup.c

Modified: head/lib/libc/stdio/clrerr.c
==============================================================================
--- head/lib/libc/stdio/clrerr.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/clrerr.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
 #undef clearerr_unlocked
 
 void
-clearerr(fp)
-	FILE *fp;
+clearerr(FILE *fp)
 {
 	FLOCKFILE(fp);
 	__sclearerr(fp);

Modified: head/lib/libc/stdio/fdopen.c
==============================================================================
--- head/lib/libc/stdio/fdopen.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fdopen.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -47,9 +47,7 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 FILE *
-fdopen(fd, mode)
-	int fd;
-	const char *mode;
+fdopen(int fd, const char *mode)
 {
 	FILE *fp;
 	int flags, oflags, fdflags, tmp;

Modified: head/lib/libc/stdio/fgetc.c
==============================================================================
--- head/lib/libc/stdio/fgetc.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fgetc.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -43,8 +43,7 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 int
-fgetc(fp)
-	FILE *fp;
+fgetc(FILE *fp)
 {
 	int retval;
 	FLOCKFILE(fp);

Modified: head/lib/libc/stdio/fgets.c
==============================================================================
--- head/lib/libc/stdio/fgets.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fgets.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
  * Return first argument, or NULL if no characters were read.
  */
 char *
-fgets(buf, n, fp)
-	char *buf;
-	int n;
-	FILE *fp;
+fgets(char * __restrict buf, int n, FILE * __restrict fp)
 {
 	size_t len;
 	char *s;

Modified: head/lib/libc/stdio/findfp.c
==============================================================================
--- head/lib/libc/stdio/findfp.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/findfp.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -91,8 +91,7 @@ spinlock_t __stdio_thread_lock = _SPINLO
 #endif
 
 static struct glue *
-moreglue(n)
-	int n;
+moreglue(int n)
 {
 	struct glue *g;
 	static FILE empty = { ._fl_mutex = PTHREAD_MUTEX_INITIALIZER };

Modified: head/lib/libc/stdio/flags.c
==============================================================================
--- head/lib/libc/stdio/flags.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/flags.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,9 +49,7 @@ __FBSDID("$FreeBSD$");
  * Return 0 on error.
  */
 int
-__sflags(mode, optr)
-	const char *mode;
-	int *optr;
+__sflags(const char *mode, int *optr)
 {
 	int ret, m, o;
 

Modified: head/lib/libc/stdio/fopen.c
==============================================================================
--- head/lib/libc/stdio/fopen.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fopen.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,9 +49,7 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 FILE *
-fopen(file, mode)
-	const char * __restrict file;
-	const char * __restrict mode;
+fopen(const char * __restrict file, const char * __restrict mode)
 {
 	FILE *fp;
 	int f;

Modified: head/lib/libc/stdio/fpurge.c
==============================================================================
--- head/lib/libc/stdio/fpurge.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fpurge.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
  * given FILE's buffer empty.
  */
 int
-fpurge(fp)
-	FILE *fp;
+fpurge(FILE *fp)
 {
 	int retval;
 	FLOCKFILE(fp);

Modified: head/lib/libc/stdio/fputc.c
==============================================================================
--- head/lib/libc/stdio/fputc.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fputc.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$");
 #include "libc_private.h"
 
 int
-fputc(c, fp)
-	int c;
-	FILE *fp;
+fputc(int c, FILE *fp)
 {
 	int retval;
 	FLOCKFILE(fp);

Modified: head/lib/libc/stdio/fputs.c
==============================================================================
--- head/lib/libc/stdio/fputs.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fputs.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -48,9 +48,7 @@ __FBSDID("$FreeBSD$");
  * Write the given string to the given file.
  */
 int
-fputs(s, fp)
-	const char * __restrict s;
-	FILE * __restrict fp;
+fputs(const char * __restrict s, FILE * __restrict fp)
 {
 	int retval;
 	struct __suio uio;

Modified: head/lib/libc/stdio/freopen.c
==============================================================================
--- head/lib/libc/stdio/freopen.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/freopen.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -55,10 +55,8 @@ __FBSDID("$FreeBSD$");
  * all possible, no matter what.
  */
 FILE *
-freopen(file, mode, fp)
-	const char * __restrict file;
-	const char * __restrict mode;
-	FILE *fp;
+freopen(const char * __restrict file, const char * __restrict mode,
+    FILE * __restrict fp)
 {
 	int f;
 	int dflags, flags, isopen, oflags, sverrno, wantfd;

Modified: head/lib/libc/stdio/fseek.c
==============================================================================
--- head/lib/libc/stdio/fseek.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fseek.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -51,10 +51,7 @@ __FBSDID("$FreeBSD$");
 #define	POS_ERR	(-(fpos_t)1)
 
 int
-fseek(fp, offset, whence)
-	FILE *fp;
-	long offset;
-	int whence;
+fseek(FILE *fp, long offset, int whence)
 {
 	int ret;
 	int serrno = errno;
@@ -72,10 +69,7 @@ fseek(fp, offset, whence)
 }
 
 int
-fseeko(fp, offset, whence)
-	FILE *fp;
-	off_t offset;
-	int whence;
+fseeko(FILE *fp, off_t offset, int whence)
 {
 	int ret;
 	int serrno = errno;
@@ -97,11 +91,7 @@ fseeko(fp, offset, whence)
  * `Whence' must be one of the three SEEK_* macros.
  */
 int
-_fseeko(fp, offset, whence, ltest)
-	FILE *fp;
-	off_t offset;
-	int whence;
-	int ltest;
+_fseeko(FILE *fp, off_t offset, int whence, int ltest)
 {
 	fpos_t (*seekfn)(void *, fpos_t, int);
 	fpos_t target, curoff, ret;

Modified: head/lib/libc/stdio/fsetpos.c
==============================================================================
--- head/lib/libc/stdio/fsetpos.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fsetpos.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$");
  * fsetpos: like fseek.
  */
 int
-fsetpos(iop, pos)
-	FILE *iop;
-	const fpos_t *pos;
+fsetpos(FILE *iop, const fpos_t *pos)
 {
 	return (fseeko(iop, (off_t)*pos, SEEK_SET));
 }

Modified: head/lib/libc/stdio/ftell.c
==============================================================================
--- head/lib/libc/stdio/ftell.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/ftell.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
  * standard ftell function.
  */
 long
-ftell(fp)
-	FILE *fp;
+ftell(FILE *fp)
 {
 	off_t rv;
 
@@ -66,8 +65,7 @@ ftell(fp)
  * ftello: return current offset.
  */
 off_t
-ftello(fp)
-	FILE *fp;
+ftello(FILE *fp)
 {
 	fpos_t rv;
 	int ret;
@@ -85,9 +83,7 @@ ftello(fp)
 }
 
 int
-_ftello(fp, offset)
-	FILE *fp;
-	fpos_t *offset;
+_ftello(FILE *fp, fpos_t *offset)
 {
 	fpos_t pos;
 	size_t n;

Modified: head/lib/libc/stdio/fvwrite.c
==============================================================================
--- head/lib/libc/stdio/fvwrite.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fvwrite.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,9 +49,7 @@ __FBSDID("$FreeBSD$");
  * to the three different kinds of output buffering is handled here.
  */
 int
-__sfvwrite(fp, uio)
-	FILE *fp;
-	struct __suio *uio;
+__sfvwrite(FILE *fp, struct __suio *uio)
 {
 	size_t len;
 	char *p;

Modified: head/lib/libc/stdio/fwalk.c
==============================================================================
--- head/lib/libc/stdio/fwalk.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fwalk.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -42,8 +42,7 @@ __FBSDID("$FreeBSD$");
 #include "glue.h"
 
 int
-_fwalk(function)
-	int (*function)(FILE *);
+_fwalk(int (*function)(FILE *))
 {
 	FILE *fp;
 	int n, ret;

Modified: head/lib/libc/stdio/fwrite.c
==============================================================================
--- head/lib/libc/stdio/fwrite.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/fwrite.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -50,10 +50,7 @@ __FBSDID("$FreeBSD$");
  * Return the number of whole objects written.
  */
 size_t
-fwrite(buf, size, count, fp)
-	const void * __restrict buf;
-	size_t size, count;
-	FILE * __restrict fp;
+fwrite(const void * __restrict buf, size_t size, size_t count, FILE * __restrict fp)
 {
 	size_t n;
 	struct __suio uio;

Modified: head/lib/libc/stdio/gets.c
==============================================================================
--- head/lib/libc/stdio/gets.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/gets.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$");
 __warn_references(gets, "warning: this program uses gets(), which is unsafe.");
 
 char *
-gets(buf)
-	char *buf;
+gets(char *buf)
 {
 	int c;
 	char *s;

Modified: head/lib/libc/stdio/getw.c
==============================================================================
--- head/lib/libc/stdio/getw.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/getw.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -39,8 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 
 int
-getw(fp)
-	FILE *fp;
+getw(FILE *fp)
 {
 	int x;
 

Modified: head/lib/libc/stdio/makebuf.c
==============================================================================
--- head/lib/libc/stdio/makebuf.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/makebuf.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -55,8 +55,7 @@ __FBSDID("$FreeBSD$");
  * optimisation) right after the _fstat() that finds the buffer size.
  */
 void
-__smakebuf(fp)
-	FILE *fp;
+__smakebuf(FILE *fp)
 {
 	void *p;
 	int flags;
@@ -88,10 +87,7 @@ __smakebuf(fp)
  * Internal routine to determine `proper' buffering for a file.
  */
 int
-__swhatbuf(fp, bufsize, couldbetty)
-	FILE *fp;
-	size_t *bufsize;
-	int *couldbetty;
+__swhatbuf(FILE *fp, size_t *bufsize, int *couldbetty)
 {
 	struct stat st;
 

Modified: head/lib/libc/stdio/mktemp.c
==============================================================================
--- head/lib/libc/stdio/mktemp.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/mktemp.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -53,9 +53,7 @@ static const unsigned char padchar[] =
 "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
 int
-mkstemps(path, slen)
-	char *path;
-	int slen;
+mkstemps(char *path, int slen)
 {
 	int fd;
 
@@ -63,8 +61,7 @@ mkstemps(path, slen)
 }
 
 int
-mkstemp(path)
-	char *path;
+mkstemp(char *path)
 {
 	int fd;
 
@@ -72,15 +69,13 @@ mkstemp(path)
 }
 
 char *
-mkdtemp(path)
-	char *path;
+mkdtemp(char *path)
 {
 	return (_gettemp(path, (int *)NULL, 1, 0) ? path : (char *)NULL);
 }
 
 char *
-_mktemp(path)
-	char *path;
+_mktemp(char *path)
 {
 	return (_gettemp(path, (int *)NULL, 0, 0) ? path : (char *)NULL);
 }
@@ -89,18 +84,13 @@ __warn_references(mktemp,
     "warning: mktemp() possibly used unsafely; consider using mkstemp()");
 
 char *
-mktemp(path)
-	char *path;
+mktemp(char *path)
 {
 	return (_mktemp(path));
 }
 
 static int
-_gettemp(path, doopen, domkdir, slen)
-	char *path;
-	int *doopen;
-	int domkdir;
-	int slen;
+_gettemp(char *path, int *doopen, int domkdir, int slen)
 {
 	char *start, *trv, *suffp, *carryp;
 	char *pad;

Modified: head/lib/libc/stdio/perror.c
==============================================================================
--- head/lib/libc/stdio/perror.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/perror.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 void
-perror(s)
-	const char *s;
+perror(const char *s)
 {
 	char msgbuf[NL_TEXTMAX];
 	struct iovec *v;

Modified: head/lib/libc/stdio/putc.c
==============================================================================
--- head/lib/libc/stdio/putc.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/putc.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$");
 #undef putc_unlocked
 
 int
-putc(c, fp)
-	int c;
-	FILE *fp;
+putc(int c, FILE *fp)
 {
 	int retval;
 	FLOCKFILE(fp);

Modified: head/lib/libc/stdio/putchar.c
==============================================================================
--- head/lib/libc/stdio/putchar.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/putchar.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,8 +49,7 @@ __FBSDID("$FreeBSD$");
  * A subroutine version of the macro putchar
  */
 int
-putchar(c)
-	int c;
+putchar(int c)
 {
 	int retval;
 	FILE *so = stdout;

Modified: head/lib/libc/stdio/puts.c
==============================================================================
--- head/lib/libc/stdio/puts.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/puts.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -48,8 +48,7 @@ __FBSDID("$FreeBSD$");
  * Write the given string to stdout, appending a newline.
  */
 int
-puts(s)
-	char const *s;
+puts(char const *s)
 {
 	int retval;
 	size_t c = strlen(s);

Modified: head/lib/libc/stdio/putw.c
==============================================================================
--- head/lib/libc/stdio/putw.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/putw.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$");
 #include "libc_private.h"
 
 int
-putw(w, fp)
-	int w;
-	FILE *fp;
+putw(int w, FILE *fp)
 {
 	int retval;
 	struct __suio uio;

Modified: head/lib/libc/stdio/remove.c
==============================================================================
--- head/lib/libc/stdio/remove.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/remove.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -42,8 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 
 int
-remove(file)
-	const char *file;
+remove(const char *file)
 {
 	struct stat sb;
 

Modified: head/lib/libc/stdio/setbuffer.c
==============================================================================
--- head/lib/libc/stdio/setbuffer.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/setbuffer.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -39,10 +39,7 @@ __FBSDID("$FreeBSD$");
 #include <stdio.h>
 
 void
-setbuffer(fp, buf, size)
-	FILE *fp;
-	char *buf;
-	int size;
+setbuffer(FILE *fp, char *buf, int size)
 {
 
 	(void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
@@ -52,8 +49,7 @@ setbuffer(fp, buf, size)
  * set line buffering
  */
 int
-setlinebuf(fp)
-	FILE *fp;
+setlinebuf(FILE *fp)
 {
 
 	return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));

Modified: head/lib/libc/stdio/stdio.c
==============================================================================
--- head/lib/libc/stdio/stdio.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/stdio.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -50,10 +50,7 @@ __FBSDID("$FreeBSD$");
  * Small standard I/O/seek/close functions.
  */
 int
-__sread(cookie, buf, n)
-	void *cookie;
-	char *buf;
-	int n;
+__sread(void *cookie, char *buf, int n)
 {
 	FILE *fp = cookie;
 
@@ -61,10 +58,7 @@ __sread(cookie, buf, n)
 }
 
 int
-__swrite(cookie, buf, n)
-	void *cookie;
-	char const *buf;
-	int n;
+__swrite(void *cookie, char const *buf, int n)
 {
 	FILE *fp = cookie;
 
@@ -72,10 +66,7 @@ __swrite(cookie, buf, n)
 }
 
 fpos_t
-__sseek(cookie, offset, whence)
-	void *cookie;
-	fpos_t offset;
-	int whence;
+__sseek(void *cookie, fpos_t offset, int whence)
 {
 	FILE *fp = cookie;
 
@@ -83,8 +74,7 @@ __sseek(cookie, offset, whence)
 }
 
 int
-__sclose(cookie)
-	void *cookie;
+__sclose(void *cookie)
 {
 
 	return (_close(((FILE *)cookie)->_file));
@@ -94,10 +84,7 @@ __sclose(cookie)
  * Higher level wrappers.
  */
 int
-_sread(fp, buf, n)
-	FILE *fp;
-	char *buf;
-	int n;
+_sread(FILE *fp, char *buf, int n)
 {
 	int ret;
 
@@ -115,10 +102,7 @@ _sread(fp, buf, n)
 }
 
 int
-_swrite(fp, buf, n)
-	FILE *fp;
-	char const *buf;
-	int n;
+_swrite(FILE *fp, char const *buf, int n)
 {
 	int ret;
 	int serrno;
@@ -145,10 +129,7 @@ _swrite(fp, buf, n)
 }
 
 fpos_t
-_sseek(fp, offset, whence)
-	FILE *fp;
-	fpos_t offset;
-	int whence;
+_sseek(FILE *fp, fpos_t offset, int whence)
 {
 	fpos_t ret;
 	int serrno, errret;

Modified: head/lib/libc/stdio/tempnam.c
==============================================================================
--- head/lib/libc/stdio/tempnam.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/tempnam.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -47,8 +47,7 @@ __warn_references(tempnam,
 extern char *_mktemp(char *);
 
 char *
-tempnam(dir, pfx)
-	const char *dir, *pfx;
+tempnam(const char *dir, const char *pfx)
 {
 	int sverrno;
 	char *f, *name;

Modified: head/lib/libc/stdio/tmpnam.c
==============================================================================
--- head/lib/libc/stdio/tmpnam.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/tmpnam.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -47,8 +47,7 @@ __warn_references(tmpnam,
 extern char *_mktemp(char *);
 
 char *
-tmpnam(s)
-	char *s;
+tmpnam(char *s)
 {
 	static u_long tmpcount;
 	static char buf[L_tmpnam];

Modified: head/lib/libc/stdio/vscanf.c
==============================================================================
--- head/lib/libc/stdio/vscanf.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/vscanf.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -49,10 +49,7 @@ __FBSDID("$FreeBSD$");
 #include "xlocale_private.h"
 
 int
-vscanf_l(locale, fmt, ap)
-	locale_t locale;
-	const char * __restrict fmt;
-	__va_list ap;
+vscanf_l(locale_t locale, const char * __restrict fmt, __va_list ap)
 {
 	int retval;
 	FIX_LOCALE(locale);
@@ -63,9 +60,7 @@ vscanf_l(locale, fmt, ap)
 	return (retval);
 }
 int
-vscanf(fmt, ap)
-	const char * __restrict fmt;
-	__va_list ap;
+vscanf(const char * __restrict fmt, __va_list ap)
 {
 	return vscanf_l(__get_locale(), fmt, ap);
 }

Modified: head/lib/libc/stdio/wbuf.c
==============================================================================
--- head/lib/libc/stdio/wbuf.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/wbuf.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -47,9 +47,7 @@ __FBSDID("$FreeBSD$");
  * Non-MT-safe
  */
 int
-__swbuf(c, fp)
-	int c;
-	FILE *fp;
+__swbuf(int c, FILE *fp)
 {
 	int n;
 

Modified: head/lib/libc/stdio/wsetup.c
==============================================================================
--- head/lib/libc/stdio/wsetup.c	Tue Apr 23 14:06:32 2013	(r249809)
+++ head/lib/libc/stdio/wsetup.c	Tue Apr 23 14:36:44 2013	(r249810)
@@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$");
  * _wsetup returns 0 if OK to write; otherwise, it returns EOF and sets errno.
  */
 int
-__swsetup(fp)
-	FILE *fp;
+__swsetup(FILE *fp)
 {
 	/* make sure stdio is set up */
 	if (!__sdidinit)


More information about the svn-src-head mailing list