Open System Services System Calls Reference Manual (G06.28+)
spt_fprintfx(2) OSS System Calls Reference Manual
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values
in the native environment. IEEE values can include NaN and infinity, and the sign of 0.0 (zero)
can be either positive or negative. Refer to the fp_class(3) reference page for a description of
IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-point conversions.
RETURN VALUES
Upon successful completion, this function returns the number of bytes in the output string. Oth-
erwise, a negative value is returned.
If the file descriptor underlying stream becomes invalid (is closed by another thread), -1 is
returned with an errno value of [EBADF]. If a signal is received via the pthread_kill() function
and is not blocked, ignored, or handled, -1 is returned with an errno value of [EINTR].
ERRORS
The spt_fprintfx( ) function fails if stream is unbuffered, or if stream’s buffer needed to be
flushed and the function call caused an underlying spt_writex() or lseek() function to be
invoked. In addition, if the spt_fprintfx() function fails, errno is set to one of 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 writ-
ing.
[EFBIG] An attempt was made to write to a file that exceeds the process’s file size limit or
the maximum file size.
[EILSEQ] An invalid wide character was detected.
[EINTR] The read operation was interrupted by a signal that was caught, and no data was
transferred.
[EINVAL] There are insufficient arguments.
[EIO] The implementation supports job control; the process is a member of a back-
ground 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 might also be returned under
implementation-defined conditions.
[ENOMEM] Insufficient storage space was available.
[ENOSPC] There was no free space remaining on the device containing the file.
[ENXIO] A request was made of a nonexistent device, or the request was outside the capa-
bilities of the device.
[EPIPE] An attempt was 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 process.
RELATED INFORMATION
Functions: fp_class(3), fprintf(3), isnan(3), toascii(3), printf(3), putc(3), scanf(3), sprintf(3),
spt_fprintf(2), spt_printfx(2).
7−156 Hewlett-Packard Company 527186-005