setbuf.3 (107619) | setbuf.3 (108087) |
---|---|
1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the American National Standards Committee X3, on Information 6.\" Processing Systems. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93 | 1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the American National Standards Committee X3, on Information 6.\" Processing Systems. 7.\" 8.\" Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" SUCH DAMAGE. 35.\" 36.\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93 |
37.\" $FreeBSD: head/lib/libc/stdio/setbuf.3 107619 2002-12-04 18:57:46Z ru $ | 37.\" $FreeBSD: head/lib/libc/stdio/setbuf.3 108087 2002-12-19 09:40:28Z ru $ |
38.\" 39.Dd June 4, 1993 40.Dt SETBUF 3 41.Os 42.Sh NAME 43.Nm setbuf , 44.Nm setbuffer , 45.Nm setlinebuf , --- 43 unchanged lines hidden (view full) --- 89is always unbuffered. 90.Pp 91The 92.Fn setvbuf 93function 94may be used to alter the buffering behavior of a stream. 95The 96.Fa mode | 38.\" 39.Dd June 4, 1993 40.Dt SETBUF 3 41.Os 42.Sh NAME 43.Nm setbuf , 44.Nm setbuffer , 45.Nm setlinebuf , --- 43 unchanged lines hidden (view full) --- 89is always unbuffered. 90.Pp 91The 92.Fn setvbuf 93function 94may be used to alter the buffering behavior of a stream. 95The 96.Fa mode |
97parameter must be one of the following three macros: | 97argument must be one of the following three macros: |
98.Bl -tag -width _IOFBF -offset indent 99.It Dv _IONBF 100unbuffered 101.It Dv _IOLBF 102line buffered 103.It Dv _IOFBF 104fully buffered 105.El 106.Pp 107The 108.Fa size | 98.Bl -tag -width _IOFBF -offset indent 99.It Dv _IONBF 100unbuffered 101.It Dv _IOLBF 102line buffered 103.It Dv _IOFBF 104fully buffered 105.El 106.Pp 107The 108.Fa size |
109parameter may be given as zero | 109argument may be given as zero |
110to obtain deferred optimal-size buffer allocation as usual. 111If it is not zero, 112then except for unbuffered files, the 113.Fa buf 114argument should point to a buffer at least 115.Fa size 116bytes long; 117this buffer will be used instead of the current buffer. --- 89 unchanged lines hidden --- | 110to obtain deferred optimal-size buffer allocation as usual. 111If it is not zero, 112then except for unbuffered files, the 113.Fa buf 114argument should point to a buffer at least 115.Fa size 116bytes long; 117this buffer will be used instead of the current buffer. --- 89 unchanged lines hidden --- |