summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Drehmel <robert@FreeBSD.org>2002-08-14 23:45:42 +0000
committerRobert Drehmel <robert@FreeBSD.org>2002-08-14 23:45:42 +0000
commit3248d0a51743c450cf9c656c793102b98b5aa44e (patch)
tree4a5ee2a856f08d941a04f571a20db00d3d4f6f88
parent620035ef8982a70259ba414df3039c0d1625aa58 (diff)
Notes
-rw-r--r--include/stdio.h4
-rw-r--r--lib/libc/stdio/setbuf.34
-rw-r--r--lib/libc/stdio/setbuf.c4
-rw-r--r--lib/libc/stdio/setvbuf.c6
4 files changed, 6 insertions, 12 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 0d241fa27bd1..4067b79ceb11 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -243,8 +243,8 @@ int remove(const char *);
int rename(const char *, const char *);
void rewind(FILE *);
int scanf(const char *, ...);
-void setbuf(FILE *, char *);
-int setvbuf(FILE *, char *, int, size_t);
+void setbuf(FILE *__restrict, char *__restrict);
+int setvbuf(FILE *__restrict, char *__restrict, int, size_t);
int sprintf(char *, const char *, ...);
int sscanf(const char *, const char *, ...);
FILE *tmpfile(void);
diff --git a/lib/libc/stdio/setbuf.3 b/lib/libc/stdio/setbuf.3
index d25f1b8dd6ca..bfe6487b492d 100644
--- a/lib/libc/stdio/setbuf.3
+++ b/lib/libc/stdio/setbuf.3
@@ -50,13 +50,13 @@
.Sh SYNOPSIS
.In stdio.h
.Ft void
-.Fn setbuf "FILE *stream" "char *buf"
+.Fn setbuf "FILE *restrict stream" "char *restrict buf"
.Ft void
.Fn setbuffer "FILE *stream" "char *buf" "int size"
.Ft int
.Fn setlinebuf "FILE *stream"
.Ft int
-.Fn setvbuf "FILE *stream" "char *buf" "int mode" "size_t size"
+.Fn setvbuf "FILE *restrict stream" "char *restrict buf" "int mode" "size_t size"
.Sh DESCRIPTION
The three types of buffering available are unbuffered, block buffered,
and line buffered.
diff --git a/lib/libc/stdio/setbuf.c b/lib/libc/stdio/setbuf.c
index e6209fd298ef..a1edef4a818f 100644
--- a/lib/libc/stdio/setbuf.c
+++ b/lib/libc/stdio/setbuf.c
@@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$");
#include "local.h"
void
-setbuf(fp, buf)
- FILE *fp;
- char *buf;
+setbuf(FILE *__restrict fp, char *__restrict buf)
{
(void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
}
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c
index df88d246cf68..8be8ff61a033 100644
--- a/lib/libc/stdio/setvbuf.c
+++ b/lib/libc/stdio/setvbuf.c
@@ -52,11 +52,7 @@ __FBSDID("$FreeBSD$");
* a buffer.
*/
int
-setvbuf(fp, buf, mode, size)
- FILE *fp;
- char *buf;
- int mode;
- size_t size;
+setvbuf(FILE *__restrict fp, char *__restrict buf, int mode, size_t size)
{
int ret, flags;
size_t iosize;