Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tcflow(S) — System V/386 Software Development System 3.2.2b

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     TCFLOW(S)                 UNIX System V                 TCFLOW(S)



     Name
          tcdrain, tcflow, tcflush, tcsendbreak - line control
          functions

     Syntax
          #include <termios.h>

          int tcdrain (fildes)
          int fildes;

          int tcflow (fildes, action)
          int fildes;
          int action;

          int tcflush (fildes, queue_selector)
          int fildes;
          int queue_selector;

          int tcsendbreak (fildes, duration)
          int fildes;
          int duration;

     Description
          If the terminal is using asynchronous serial data
          transmission, the tcsendbreak() function causes transmission
          of a continuous stream of zero-valued bits for a specific
          duration. If duration is zero, tcsnedbreak transmits zero-
          valued bits for at least .25 seconds and not more than .5
          seconds. If duration is not set to zero, tcsendbreak sends
          zero-valued bits for the amount of time specified by the
          implementation.

          If the terminal is not using asynchronous serial data
          transmission, it is implementation defined whether the
          tcsendbreak function sends data to generate a break
          condition (as defined by the implementation) or returns
          without taking any action.

          The tcdrain() function waits until all output written to
          fildes has been transmitted.

          The tcflush() function discards all data written to fildes
          but not transmitted, or data received but not read,
          depending on the value of queue_selector:

          1.   If queue_selector is TCIFLUSH, it flushes data received
               but not read.

          2.   If queue_selector is TCOFLUSH, it flushes data written
               but not transmitted.

          3.   If queue_selector is TCIOFLUSH, it performs both
               actions.

          The tcflow() function suspends transmission or reception of
          dataon the object referred to by fildes, depending onthe
          value of action. Possible values for action include:

          1.   If action is TCOOFF, output is suspended.

          2.   If action is TCOON, output is restarted.

          3.   If action is TCIOFF, a STOP character is transmitted,
               which is intended to cause the terminal to stop
               transmitting data to the system.

          4.   If action is TCION, a START character is transmitted,
               which is intended to cause the terminal to start
               transmitting data to the system.

          The symbolic constants for the values of queue_selector and
          action are defined in <termios.h>.  The default on open of a
          terminal file is that neither its input nor its output is
          suspended.

     Return Value
          Upon successful completion, these routines return a value of
          zero. Otherwise, a value of of -1 is returned and errno is
          set to indicate the error. Possible error conditions
          include:

          tcsendbreak:
          [EBADF]    The fildes argument is not a valid file descriptor.
          [ENOTTY]   The file associated with fildes is not a terminal.

          tcdrain:
          [EBADF]    The fildes argument is not a valid file descriptor.
          [EINTR]    A signal interrupted the function.
          [ENOTTY]   The file associated with fildes is not a terminal.

          tcflush:
          [EBADF]    The fildes argument is not a valid file descriptor.
          [EINVAL]   The queue_selector argument is not a proper value.
          [ENOTTY]   The file associated with fildes is not a terminal.

          tcflow:
          [EBADF]    The fildes argument is not a valid file descriptor.
          [EINVAL]   The action argument is not a proper value.
          [ENOTTY]   The file associated with fildes is not a terminal.

     See Also
          tcattr(S)

     Standards Conformance
          tcdrain, tcflow, tcflush and tcsendbreak are conformant
          with:
          AT&T SVID Issue 2, Select Code 307-127.


                                                (printed 6/20/89)

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