|Did you know ...||Search Documentation:|
|Interacting with foreign streams|
ENC_WCHARand 1 for all other encodings (including multibyte encodings such as
SIO_LBUFbuffering mode and updates the stream position information if enabled (
SIO_RECORDPOS). Returns 0 on success, -1 on error.
SIO_RECORDPOS). Returns -1 on end of file or error. Use Sferror() or Sfeof() to distinguish end of file from an error. This is a C macro.
Updates the stream position information if enabled (
0xfffdis returned. Other errors and end-of-file return -1; Use Sferror() or Sfeof() to distinguish end of file from an error.
SIO_FEOFflag, (2) test whether the buffer is non-empty, (3) fill the buffer and return non-zero if the Sread_function() returned 0 (zero).
SIO_FLUSHOUTPUTafter the buffer was successfully written.
long. Whence is one of
SIO_SEEK_END, seeking relative to the start, current position or end.
SIO_CLOSE_TRYLOCKwhich causes Sgcclose() to return -1 with errno set to
EDEADLKif the stream is locked. Alternatively, using
SIO_CLOSE_FORCEthe stream is closed and released without gaining a lock. This should be safe because the stream is garbage and thus no thread can use the lock.
In addition, Sgcclose() never raises a Prolog exception because Prolog interaction is not allowed from the blob release hook and there is no meaningful way to raise a Prolog exception from this context.
\ncharacter. On end-of-file or an error,
NULLis returned. If the input line is longer that n bytes buf is not 0-terminated.
Sfgets(buf, Slinesize, Sinput). Deletes the terminating
\ncharacter. Slinesize is a global variable that defines the length of the input buffer. Deprecated.
SIO_RP_BLOCK, fill the buffer (possibly blocking) if the buffer is empty. Update the stream position information unless flags include
SIO_RP_NOPOS. This function effectively provides functionality similar to POSIX read() on a stream. This function is used by read_pending_codes/3.
%escape sequences. The
%character is followed by numeric arguments and modifier characters. The generic format of this is described by the regular expression
[+-0 #]*(\d*|\*)(.(\d*|\*))?. Here,
implies right alignment,
00-padding and, a space white-space padding and
modified output. The two optional numerical arguments are separated by a full stop and may be
to get them from the argument list. The first numerical argument specifies the field width and the second the precision for floating point numbers.
This sequence is followed by optional type information. For integers
this is one of
size_t). For strings this is one of
(ISO Latin 1),
U (UTF-8) or
Finally we come to the format specifier. This is one of
long long) or
size_t) denote the size.
This function returns the number of characters written. Note that due to multibyte encodings the number of bytes written can be more.
ENC_ISO_LATIN_1encoding. Future versions will probably change to
NULL, asking the system to allocate a buffer or points at a buffer of (at least) the indicated size long. The default buffer size is defined by the C macro