QP_stream: int errno;
An error code is stored in the errno
field of a stream structure
when an error is detected in any of the three layers of
input/output functions.
The top layer QP functions set the error code to QP_errno
when an error occurs in the call to the functions. The error code
stored in this field may not last more than two QP input/output
functions calls since middle layer functions and some QP functions
clear out this field before they call the bottom layer function.
If an error is detected in the bottom layer function, the errno
field
should be given an appropriate error code before the function returns.
The error code stored in errno
field can be any of the host operating
system error numbers, QP error numbers or user-defined error numbers.