diff options
author | Richard Lowe <richlowe@richlowe.net> | 2011-03-14 14:05:30 -0400 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2011-03-14 14:05:30 -0400 |
commit | c10c16dec587a0662068f6e2991c29ed3a9db943 (patch) | |
tree | f414286f4bba41d75683ed4fbbaa6bfa4bf7fabd /usr/src/man/man3c/getws.3c | |
parent | 68caef18a23a498d9e3017b983562c0f4fd8ab23 (diff) | |
download | illumos-joyent-c10c16dec587a0662068f6e2991c29ed3a9db943.tar.gz |
243 system manual pages should live with the software
Reviewed by: garrett@nexenta.com
Reviewed by: gwr@nexenta.com
Reviewed by: trisk@opensolaris.org
Approved by: gwr@nexenta.com
--HG--
extra : rebase_source : 0c599d0bec0dc8865fbba67721a7a6cd6b1feefb
Diffstat (limited to 'usr/src/man/man3c/getws.3c')
-rw-r--r-- | usr/src/man/man3c/getws.3c | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/usr/src/man/man3c/getws.3c b/usr/src/man/man3c/getws.3c new file mode 100644 index 0000000000..d1dd4ef2f3 --- /dev/null +++ b/usr/src/man/man3c/getws.3c @@ -0,0 +1,95 @@ +'\" te +.\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. +.\" 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 getws 3C "15 Oct 2003" "SunOS 5.11" "Standard C Library Functions" +.SH NAME +getws, fgetws \- get a wide-character string from a stream +.SH SYNOPSIS +.LP +.nf +#include <stdio.h> +include <widec.h> + +\fBwchar_t *\fR\fBgetws\fR(\fBwchar_t *\fR\fIws\fR); +.fi + +.LP +.nf +#include <stdio.h> +include <wchar.h> + +\fBwchar_t *\fR\fBfgetws\fR(\fBwchar_t *restrict\fR \fIws\fR, \fBint\fR \fIn\fR, \fBFILE *restrict\fR \fIstream\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBgetws()\fR function reads a string of characters from the standard input +stream, \fBstdin\fR, converts these characters to the corresponding +wide-character codes, and writes them to the array pointed to by \fIws\fR, +until a newline character is read, converted and transferred to \fIws\fR or an +end-of-file condition is encountered. The wide-character string, \fIws\fR, is +then terminated with a null wide-character code. +.sp +.LP +The \fBfgetws()\fR function reads characters from the \fIstream\fR, converts +them to the corresponding wide-character codes, and places them in the +\fBwchar_t\fR array pointed to by \fIws\fR until \fIn\fR\(mi1 characters are +read, or until a newline character is read, converted and transferred to +\fIws\fR, or an end-of-file condition is encountered. The wide-character +string, \fIws\fR, is then terminated with a null wide-character code. +.sp +.LP +If an error occurs, the resulting value of the file position indicator for the +stream is indeterminate. +.sp +.LP +The \fBfgetws()\fR function may mark the \fBst_atime\fR field of the file +associated with \fIstream\fR for update. The \fBst_atime\fR field will be +marked for update by the first successful execution of \fBfgetc\fR(3C), +\fBfgets\fR(3C), \fBfgetwc\fR(3C), \fBfgetws()\fR, \fBfread\fR(3C), +\fBfscanf\fR(3C), \fBgetc\fR(3C), \fBgetchar\fR(3C), \fBgets\fR(3C), or +\fBscanf\fR(3C) using \fIstream\fR that returns data not supplied by a prior +call to \fBungetc\fR(3C) or \fBungetwc\fR(3C). +.SH RETURN VALUES +.sp +.LP +Upon successful completion, \fBgetws()\fR and \fBfgetws()\fR return \fIws\fR. +If the stream is at end-of-file, the end-of-file indicator for the stream is +set and \fBfgetws()\fR returns a null pointer. For standard-conforming (see +\fBstandards\fR(5)) applications, if the end-of-file indicator for the stream +is set, \fBfgetws()\fR returns a null pointer whether or not the stream is at +end-of-file. If a read error occurs, the error indicator for the stream is set +and \fBfgetws()\fR returns a null pointer and sets \fBerrno\fR to indicate the +error. +.SH ERRORS +.sp +.LP +See \fBfgetwc\fR(3C) for the conditions that will cause \fBfgetws()\fR to fail. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface Stability\fBfgetws()\fR is Standard. +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBferror\fR(3C), \fBfgetwc\fR(3C), \fBfread\fR(3C), \fBgetwc\fR(3C), +\fBputws\fR(3C), \fBscanf\fR(3C), \fBungetc\fR(3C), +\fBungetwc\fR(3C)\fBattributes\fR(5), \fBstandards\fR(5) |