12.3.69 SP_put_codes()

Synopsis

     #include <sicstus/sicstus.h>
     
     spio_t_error_code
     SP_put_codes(
       SP_stream *stream,
       spio_t_wchar const *codes,
       size_t code_count,
       spio_t_bits options);

Write several codes to a text stream.

Arguments

stream
The stream. Must be a text stream open for output.
codes
A pointer to the data to write.
code_count
The number of character codes to write. Note that this is the number of character codes, not the number of bytes.
options
The following bits can be set:
SP_PUT_CODES_OPTION_NONBLOCKING
Write the codes without blocking.

Return Value

On success, all data has been written and SPIO_S_NOERR or some other success code returned.

On failure, returns an error code without transferring any data. Error codes with special meaning for SP_put_codes():

SPIO_E_WOULD_BLOCK
SP_PUT_CODES_OPTION_NONBLOCKING was set but the operation would block.

Other error codes may also be returned.

See Also

cpg-ref-SP_put_code. Prolog Streams.


Send feedback on this subject.