*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> fgetws (3)              
Title
Content
Arch
Section
 

FGETWS(3)

Contents


NAME    [Toc]    [Back]

     fgetws -- get a line of wide characters from a stream

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <stdio.h>
     #include <wchar.h>

     wchar_t *
     fgetws(wchar_t * restrict ws, int n, FILE * restrict fp);

DESCRIPTION    [Toc]    [Back]

     The fgetws() function reads at most one less than the number of characters
 specified by n from the given fp and stores them in the wide character
 string ws.  Reading stops when a newline character is found, at endof-file
 or error.	The newline, if any, is retained.  If any characters
     are read and there is no error, a `\0' character is appended to end the
     string.

RETURN VALUES    [Toc]    [Back]

     Upon successful completion, fgetws() returns ws.  If end-of-file occurs
     before any characters are read, fgetws() returns NULL and the buffer contents
 remain unchanged.  If an error occurs, fgetws() returns NULL and
     the buffer contents are indeterminate.  The fgetws() function does not
     distinguish between end-of-file and error, and callers must use feof(3)
     and ferror(3) to determine which occurred.

ERRORS    [Toc]    [Back]

     The fgetws() function will fail if:

     [EBADF]		The given fp argument is not a readable stream.

     [EILSEQ]		The data obtained from the input stream does not form
			a valid multibyte character.

     The function fgetws() may also fail and set errno for any of the errors
     specified for the routines fflush(3), fstat(2), read(2), or malloc(3).

SEE ALSO    [Toc]    [Back]

      
      
     feof(3), ferror(3), fgets(3)

STANDARDS    [Toc]    [Back]

     The fgetws() function conforms to IEEE Std 1003.1-2001 (``POSIX.1'').


FreeBSD 5.2.1			August 6, 2002			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
fputws FreeBSD output a line of wide characters to a stream
wmemset Linux fill an array of wide-characters with a constant wide character
wcsspn Linux advance in a wide-character string, skipping any of a set of wide characters
wcscspn Linux search a wide-character string for any of a set of wide characters
wcspbrk Linux search a wide-character string for any of a set of wide characters
gets OpenBSD get a line from a stream
fgets OpenBSD get a line from a stream
fgetln OpenBSD get a line from a stream
gets NetBSD get a line from a stream
fgetln FreeBSD get a line from a stream
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service