Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

IFWRITE(3)

HP-UX

NAME

ifwrite − used to send a block of data to the formatted I/O write buffer

SYNOPSIS

 #include <sicl.h>
 int ifwrite (
    INST id,
    char *buf,
    unsigned long datalen,
    int end,
    unsigned long *actualcnt
 );

DESCRIPTION

This function is used to send a block of data to the formatted I/O write buffer (the same buffer used by iprintf).  The buf argument is a pointer to the arbitrary block of data to send to the specified interface or device.  The datalen argument is an unsigned long integer containing the length of the data block in bytes. 
 
If the end argument is non-zero, this function will send the END indicator with the last byte of the data block (the buffer will be flushed).  Otherwise, if end is set to zero, no END indicator will be sent (the buffer will not be flushed). 
 
The actualcnt argument is a pointer to an unsigned long integer.  Upon exit, it will contain the actual number of bytes written to the specified device.  A NULL pointer can be passed for this argument and it will be ignored. 
 
This function acts identically to the iwrite function, except the data is not written directly to the device instead it is written to the formatted I/O write buffer (the same buffer used by iprintf).  The advantage to this function over iwrite is that it can be used with calls to iprintf, while iwrite cannot. 
 

RETURN VALUE

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

ERRORS

ifwrite fails under the following circumstances, and sets the return value to one of the following:
 

­[I_ERR_NORSRC] Out of system resources

­[I_ERR_NOINTF] Interface is not active

­[I_ERR_NODEV] Device is not active

­[I_ERR_BADID] The INST id is invalid

­[I_ERR_BADADDR] Invalid address (device/interface doesn’t exist)

 

SEE ALSO

iwrite, iflush, ifread, iprintf, iscanf, isetbuf, isetubuf
 

AUTHOR

ifwrite was developed by HP. 

Hewlett-Packard Company  —  September 29, 1999

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