summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/stdio.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-04-23 14:36:44 +0000
committeremaste <emaste@FreeBSD.org>2013-04-23 14:36:44 +0000
commited68431e9eb5f5d79436afe779c4564cc625c69e (patch)
treeeee3d4211d69ff36f950fb608985ae69d9c4c4e1 /lib/libc/stdio/stdio.c
parent1f1bd98319ba57830e89bfdbf57da9dfa3da9084 (diff)
downloadFreeBSD-src-ed68431e9eb5f5d79436afe779c4564cc625c69e.zip
FreeBSD-src-ed68431e9eb5f5d79436afe779c4564cc625c69e.tar.gz
Convert libc/stdio from K&R to ANSI C
And add '__restrict' where it appeared in the header prototypes
Diffstat (limited to 'lib/libc/stdio/stdio.c')
-rw-r--r--lib/libc/stdio/stdio.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c
index b02fa5d..44ee0ab 100644
--- a/lib/libc/stdio/stdio.c
+++ b/lib/libc/stdio/stdio.c
@@ -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;
OpenPOWER on IntegriCloud