Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ iflush(3) — HP-UX Instrument Control Library G.03.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

iprintf(3)

iscanf(3)

ipromptf(3)

isetbuf(3)

IFLUSH(3)

HP-UX

NAME

iflush − Flush formatted I/O buffers associated with session. 

SYNOPSIS

#include <sicl.h>
 
int iflush (INST id, int mask);
 

DESCRIPTION

The iflush routine is used to manually flush the read and/or the write buffers for SICL’s formatted I/O routines. 

The mask may be one or a combination bit-wise OR of the following flags:
 
        I_BUF_READ - Discard the read buffer and (if data was
        present in the read buffer) read from the device until an END
        indicator is read (causes the loss of data).
 
        I_BUF_WRITE - Flush the write buffer by writing all
        buffered data to the device.
 
        I_BUF_DISCARD_READ - Discards the read buffer (does
        not perform I/O to the device).
 
        I_BUF_DISCARD_WRITE - Discards the write buffer (does
        not perform I/O to the device).
 
The I_BUF_READ and I_BUF_WRITE may be used together and the I_BUF_DISCARD_READ and I_BUF_DISCARD_WRITE may be used together.  Other combinations are invalid.
 
If iclear is called to perform either a device or interface clear, then both the read and the write buffers are discarded.  Performing an iclear is equivalent to performing the following iflush call (in addition to the device or interface clear function):
 
iflush (id, I_BUF_DISCARD_READ | I_BUF_DISCARD_WRITE);
 

RETURN VALUE

iflush returns (0) if successful, or non-zero if an error was encountered. 

ERRORS

iflush fails under the following circumstances, and returns one of the following values:
 

­[I_ERR_NOINTF] Interface is not active

­[I_ERR_NODEV] Device is not active

­[I_ERR_BADID] The INST id is invalid

 

SEE ALSO

iprintf(3), iscanf(3), ipromptf(3), isetbuf(3)

AUTHOR

iflush was developed by HP. 

Hewlett-Packard Company  —  September 29, 1999

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