diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-03-27 11:29:00 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-03-27 11:29:00 +0000 |
commit | 6dcfbbc68f881fbf5c20d25817a0221dfb135170 (patch) | |
tree | 40307666f6d7711499061d8c4be75029a6d851e9 /usr/src/man/man3c/stdio.3c | |
parent | b0624b90ec9a0c04cca626925beee3ae403457ce (diff) | |
parent | cd62a92d4a964bfe61d35ba2301b69e65e22a509 (diff) | |
download | illumos-joyent-6dcfbbc68f881fbf5c20d25817a0221dfb135170.tar.gz |
[illumos-gate merge]
commit cd62a92d4a964bfe61d35ba2301b69e65e22a509
7092 Want support for stdio memory streams
12360 fwrite can loop forever on zero byte write
12392 ftello64 doesn't handle ungetc() correctly when unbuffered
commit 1470234269f4edea4cbf270cb2475e4988b788d5
12359 Want a means to set the umem mtbf at runtine
commit 0ac311bae7f6f50d9ba506b52bd8860f2d68d4ce
12358 Need mbrtowc variant that indicates consumed zero bytes
commit d726994754c938f91b6fd7e96b5cab3829615c58
12357 getc/putc_unlocked need to set orientation
Diffstat (limited to 'usr/src/man/man3c/stdio.3c')
-rw-r--r-- | usr/src/man/man3c/stdio.3c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/usr/src/man/man3c/stdio.3c b/usr/src/man/man3c/stdio.3c index ce4b9d1f12..f7dce6dfa7 100644 --- a/usr/src/man/man3c/stdio.3c +++ b/usr/src/man/man3c/stdio.3c @@ -3,11 +3,11 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH STDIO 3C "May 18, 2005" +.\" Copyright 2020 Robert Mustacchi +.TH STDIO 3C "March 25, 2020" .SH NAME stdio, stdin, stdout, stderr \- standard buffered input/output package .SH SYNOPSIS -.LP .nf #include <stdio.h> .fi @@ -28,8 +28,6 @@ stdio, stdin, stdout, stderr \- standard buffered input/output package .fi .SH DESCRIPTION -.sp -.LP The standard I/O functions described in section 3C of this manual constitute an efficient, user-level \fBI/O\fR buffering scheme. The in-line macros \fBgetc()\fR and \fBputc()\fR handle characters quickly. The macros @@ -45,6 +43,8 @@ A file with associated buffering is called a \fIstream\fR (see \fBIntro\fR(3)) and is declared to be a pointer to a defined type \fBFILE\fR. The \fBfopen\fR(3C) function creates certain descriptive data for a stream and returns a pointer to designate the stream in all further transactions. +Streams to memory may also be created through the \fBfmemopen\fR(3C), +\fBopen_memstream\fR(3C), and \fBopen_wmemstream\fR(3C) functions. Normally, there are three open streams with constant pointers declared in the \fB<stdio.h>\fR header and associated with the standard open files: .sp @@ -113,7 +113,10 @@ a buffer intended to hold a file's pathname. The integer constant \fBFOPEN_MAX\fR specifies the minimum number of files that the implementation guarantees can be open simultaneously. Note that no more than 255 files may be opened using \fBfopen()\fR, and only file descriptors 0 -through 255 can be used in a stream. +through 255 can be used in a stream. This restriction only holds for the 32-bit +compilation environment. The 64-bit environment may use more streams and the use +of more than 255 may be enabled in a 32-bit environment through the use of +\fBextendedFILE\fR(5). .sp .LP The functions and constants mentioned in the entries of section 3S of this @@ -140,8 +143,6 @@ The \fBsetbuf()\fR or \fBsetvbuf()\fR functions (both described on the \fBsetbuf\fR(3C) manual page) may be used to change the stream's buffering strategy. .SS "Interactions of Other FILE-Type C Functions" -.sp -.LP A single open file description can be accessed both through streams and through file descriptors. Either a file descriptor or a stream will be called a \fIhandle\fR on the open file description to which it refers; an open file @@ -290,8 +291,6 @@ are followed, it is implementation defined whether, and under what conditions, all input is seen exactly once. .RE .SS "Use of stdio in Multithreaded Applications" -.sp -.LP All the \fBstdio\fR functions are safe unless they have the \fB_unlocked\fR suffix. Each \fBFILE\fR pointer has its own lock to guarantee that only one thread can access it. In the case that output needs to be synchronized, the @@ -329,18 +328,15 @@ funlockfile(iop); .in -2 .SH RETURN VALUES -.sp -.LP Invalid stream pointers usually cause grave disorder, possibly including program termination. Individual function descriptions describe the possible error conditions. .SH SEE ALSO -.sp -.LP \fBclose\fR(2), \fBlseek\fR(2), \fBopen\fR(2), \fBpipe\fR(2), \fBread\fR(2), \fBwrite\fR(2), \fBctermid\fR(3C), \fBcuserid\fR(3C), \fBfclose\fR(3C), -\fBferror\fR(3C), \fBfopen\fR(3C), \fBfread\fR(3C), \fBfseek\fR(3C), -\fBflockfile\fR(3C), \fBgetc\fR(3C), \fBgets\fR(3C), \fBpopen\fR(3C), +\fBferror\fR(3C), \fBfmemopen\fR(3C), \fBfopen\fR(3C), \fBfread\fR(3C), +\fBfseek\fR(3C), \fBflockfile\fR(3C), \fBgetc\fR(3C), \fBgets\fR(3C), +\fBopen_memstream(3C)\fR, \fBopen_wmemstream(3C(\fR, \fBpopen\fR(3C), \fBprintf\fR(3C), \fBputc\fR(3C), \fBputs\fR(3C), \fBscanf\fR(3C), \fBsetbuf\fR(3C), \fBsystem\fR(3C), \fBtmpfile\fR(3C), \fBtmpnam\fR(3C), \fBungetc\fR(3C) |