Index of Section 3 Manual Pages

Interix / SUAgetwc.3Interix / SUA

getwc(3)                                                       getwc(3)

  getwc()

  NAME

    fgetwc(), getwc(), getwchar() - get next wide-character code from input
    stream

  SYNOPSIS

    #include 
    #include 

    wint_t fgetwc (FILE *stream)
    wint_t getwc (FILE *stream)
    wint_t getwchar(void)

  DESCRIPTION

    The fgetwc(3) function obtains the next input wide-character code (if
    present) from the stream pointed at by stream, or the next wide-character
    code pushed back on the stream through ungetwc(3).

    The getwc(3) function acts essentially identically to fgetwc(3), but is a
    macro that expands in-line.

    The getwchar(3) function is equivalent to:

    getwc(stdin)

    Once end-of-file is reached, the end-of-file condition is remembered, even
    on a terminal, and all subsequent attempts to read will return WEOF until
    the condition is cleared with clearerr(3).

  RETURN VALUES

    If successful, these routines return the next requested object from the
    stream. If the stream is at end-of-file or a read error occurs, the
    routines return WEOF. Since WEOF is a valid wint_t value, you must use
    feof(3) and ferror(3) to distinguish between end-of-file and error. If an
    error occurs, the global variable errno is set to indicate the error.

  ERRORS

    These functions can set errno to the following values:

    [EBADF]
        Stream is not a valid file descriptor open for reading.

    [EIO]
        An I/O error occurred while reading from the file system.

    [EINTR]
        A read from a slow device was interrupted before any data arrived by
        the delivery of a signal.

    [EINVAL]
        The pointer associated with stream was negative.

    [EAGAIN]
        The file was marked for non-blocking I/O, and no data were ready to be
        read.

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

  SEE ALSO

    ferror(3)

    fread(3)

    fopen(3)

    putwc(3)

    ungetwc(3)

  USAGE NOTES

    All of these functions are thread safe.

    None of these functions are async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA