ENC_UNICODE_BE
and ENC_UNICODE_LE
, sizeof(wchar_t)
for ENC_WCHAR
and 1 for all other encodings (including multibyte encodings such as
ENC_UTF8
.\n
when
in
SIO_LBUF
buffering 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.SIO_REPXML
႒
SIO_REPPL
\x4242\
SIO_REPPLU
\u4242
or
\U42424242
Updates the stream position information if enabled (SIO_RECORDPOS
)
0xfffd
is returned. Other errors and end-of-file return -1;
Use
Sferror() or Sfeof()
to distinguish end of file from an error.SIO_NBUF
).SIO_FEOF
flag, (2) test whether the
buffer is non-empty, (3) fill the buffer and return non-zero if the
Sread_function() returned 0 (zero).SIO_FLUSHOUTPUT
after the buffer was successfully written.long
. Whence is one of SIO_SEEK_SET
,
SIO_SEEK_CUR
or SIO_SEEK_END
, seeking relative
to the start, current position or end.SIO_CLOSE_TRYLOCK
which causes Sgcclose()
to return -1 with
errno set to EDEADLK
if the stream is locked.
Alternatively, using SIO_CLOSE_FORCE
the 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.
\n
character. On end-of-file or an error, NULL
is returned. If
the input line is longer that n bytes buf is not
0-terminated.Sfgets(buf,
Slinesize, Sinput)
. Deletes the terminating \n
character. 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.SIO_GETPENDING
.Sfputs(q,
Soutput)
.%
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, -
left alignment, 0
0-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 l
(long
), ll
(long
long
) or
z
(size_t
). For strings this is one of L
(ISO Latin 1), U
(UTF-8) or W
(wchar_t*
).
Finally we come to the format specifier. This is one of
%
%
character itself.
c
p
d
i
l
(long
), ll
(long long
) or z
(size_t
) denote
the size.
o
u
x
X
f
e
E
g
G
double
.
s
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_1
encoding. Future versions will probably
change to ENC_UTF8
.INVALID_SOCKET
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 SIO_BUFSIZE