*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: fgetws | Section: 3 | Source: Digital UNIX | File: fgetws.3.gz
fgetws(3) Library Functions Manual fgetws(3) NAME fgetws - Gets a string from a stream LIBRARY Standard C Library (libc.so, libc.a) SYNOPSIS #include <wchar.h> wchar_t *fgetws( wchar_t *wcs, int number, FILE *stream); Application developers may want to specify an #include statement for <stdio.h> before the one for <wchar.h> if programs are being developed for multiple platforms. The additional #include statement is not re- quired on DIGITAL UNIX systems or by ISO or X/Open standards, but may be required on other vendors' systems that conform to these standards. STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: fgetws: XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. PARAMETERS Points to a buffer where output wide characters are stored. Points to the FILE structure of an open file. Specifies an upper bound (num- ber-1) on the number of characters to read. DESCRIPTION The fgetws() function reads characters from stream, converts them into the corresponding wide characters, and stores the result in the wchar_t array pointed to by the wcs parameter. The function reads until num- ber-1 characters have been read, it has read and stored in the buffer the \n (newline) character, or it has encountered the end-of-file con- dition. The function then appends a null wide character to the result stored in wcs. The fgetws() function parallels the fgets() function. RETURN VALUES On successful completion, the fgetws() function returns a pointer to wcs. Under the following conditions, the function returns a null pointer: The function encounters the end of the file before any charac- ters are read. In this case, fgetws() does not store any wide charac- ters in wcs and sets the end-of-file indicator for the stream. A read error occurs. In this case, fgetws() sets both errno and the error in- dicator for stream. After a read error, the value of the file-position indicator for stream is indeterminate. [Digital] The function could not convert the input character to a wide character. ERRORS If any of the following conditions occur, the fgetws() sets errno to the corresponding value: The O_NONBLOCK flag is set for the file de- scriptor underlying stream and the process would be delayed in the fgetws() call. The file descriptor underlying stream is not a valid file descriptor that is open for reading. The data obtained from stdin or the stream did not contain valid characters in the current locale. The read operation was terminated by a signal, and no data was trans- ferred. One of the following conditions was encountered: The process is in a background process group that is attempting to read from its controlling terminal and either the process is ignoring or blocking the SIGTTIN signal or the process group is orphaned. [XPG4-UNIX] A physi- cal I/O error occurred. RELATED INFORMATION Functions: clearerr(3), feof(3), ferror(3), fileno(3), fopen(3), fputws(3), fread(3), getc(3), gets(3), getwc(3), mbtowc(3), puts(3), scanf(3), wscanf(3) Standards: standards(5) delim off fgetws(3)

Navigation Options