Index of Section 3 Manual Pages

Interix / SUAputc.3Interix / SUA

putc(3)                                                         putc(3)

  putc()

  NAME

    fputc(), putc(), putchar() - output a character or word to a stream

  SYNOPSIS

    #include 

    int fputc (int c, FILE *stream)
    int putc (int c, FILE *stream)
    int putchar (int c)

  DESCRIPTION

    The fputc(3) function writes the character c (converted to an unsigned
    char) to the output stream pointed to by stream.

    The putc(3) function acts essentially identically to fputc(3), but is a
    macro that expands in-line. It may evaluate stream more than once, so
    arguments given to putc(3) should not be expressions with potential side
    effects.

    The putchar(3) function is identical to putc(3) with an output stream of
    stdout.

  RETURN VALUES

    The functions, fputc(3), putc(3) and putchar(3) return the character
    written. If an error occurs, the value EOF is returned.

  ERRORS

    These functions can set errno to the following values:

    [EAGAIN]
        The O_NONBLOCK flag is set for the file descriptor underlying stream
        and the process would be delayed in the write operation.

    [EBADF]
        The file descriptor underlying stream is not a valid file descriptor
        open for writing.

    [EFBIG]
        An attempt was made to write to a file that exceeds the maximum file
        size  or the process' file size limit.

    [EFBIG]
        The file is a regular file and an attempt was made to write at or
        beyond the offset maximum.

    [EINTR]
        The write operation was terminated due to the receipt of a signal, and
        no data was transferred.

    [EIO]
        A physical I/O error has occurred, or the process is a member of a
        background process group attempting to write to its controlling
        terminal, TOSTOP is set, the process is neither ignoring nor blocking
        SIGTTOU and the process group of the process is orphaned. This error
        may also be returned under implementation-dependent conditions.

    [ENOSPC]
        There was no free space remaining on the device containing the file.

    [EPIPE]
        An attempt is made to write to a pipe or FIFO that is not open for
        reading by any process. A SIGPIPE signal will also be sent to the
        thread.

  SEE ALSO

    feof(3)

    ferror(3)

    fopen(3)

    getc(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