Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tcdrain(3)

tcflow(3)

tcsendbreak(3)

termios(7)



  tcflush(3)                          CLIX                          tcflush(3)



  NAME

    tcflush - Discards data from the specified queue

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <termios.h>

    int tcflush(
      int filedescriptor ,
      int queueselector );

  PARAMETERS

    filedescriptor  Specifies an open file descriptor.

    queueselector   Specifies one of the following:

                    TCIFLUSH    Flush data received but not read.

                    TCOFLUSH    Flush data written but not transmitted.

                    TCIOFLUSH   Flush data received but not read and data
                                written but not transmitted.

  DESCRIPTION

    The tcflush() function discards any data written to the object referred to
    by the filedescriptor parameter, or data received but not read by the
    object referred to by filedescriptor, depending on the value of the
    queueselector parameter.

  EXAMPLES

    To flush the output queue, enter the following:

    rc = tcflush(2, TCOFLUSH);


  RETURN VALUES

    Upon successful completion, a value of 0 is returned.  Otherwise, a value
    of -1 is returned and the global variable errno is set to indicate the
    error.

  ERRORS




  2/94 - Intergraph Corporation                                              1






  tcflush(3)                          CLIX                          tcflush(3)



    The tcflush() function fails if one or more of the following are true:

    [EBADF]    The filedescriptor parameter does not specify a valid file
               descriptor.

    [EINVAL]   The queueselector parameter does not specify a proper value.

    [ENOTTY]   The file associated with the filedescriptor parameter is not a
               terminal.

  RELATED INFORMATION

    Functions: tcdrain(3), tcflow(3), tcsendbreak(3)

    Files: termios(7)







































  2                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026