autodoc.git/
traditional_manual/
chapter_9.html
Branch:
Tag:
Non-build tags
All tags
No tags
2003-10-28
2003-10-28 11:46:02 by Martin Stjernholm <mast@lysator.liu.se>
205dfddf391322821450bf5632b5e73b23a93969 (
38
lines) (+
27
/-
11
)
[
Show
|
Annotate
]
Branch:
8.0
Made the backend debug checks somewhat more accurate.
Rev: src/modules/files/file.c:1.306
916:
as many bytes as you have asked for, but will merely return as much as the system read function will return. This mainly useful with stream devices which can return exactly one row or packet at
-
a time.</p>
+
a time.
If
<
code>not_all<
/
code> is used in blocking mode, <code>read()</code> will
+
only block if there's no data at all available.</
p>
<p> If something goes wrong and <code>not_all</code> is set, zero will be returned. If something goes wrong and <code>not_all</code> is zero or left out, then either zero or a string shorter than <code>len</code> is returned.
1544:
<dt class='head--doc'>Description</dt> <dd class='body--doc'><p>Write data to a file or a stream.</p> <p> Writes <code>data</code> and returns the number of bytes that were
-
actually written.</p>
-
<p>
If
more
than
one
argument
is
given
, <code>
sprintf
()</code> will
be
-
used
to
format
them
.</p>
-
<p> If <code>data</code> is an array,
it
will be
concatenated, and then
written.</p>
-
<p>
0
is
returned
in
nonblocking
mode
if
it
was
not
possible
to
write
-
anything
without
blocking.
<
/p
>
-
<
p
>
-1
is
returned
if
something
went
wrong
and
no
bytes
were
written
.</p>
+
actually written.
It can be less than the size of the given data if
</p>
+
<
ul>
+
<li><
p>
some
data
was
written
successfully
and
then something went
+
wrong, or</p>
+
</li><li><p>nonblocking mode
is
used and not all data could be written
+
without blocking.</p>
+
</li></ul><p>-1 is returned if something went wrong and no bytes were written.
+
If only some data was written due to an error and that error
+
persists
,
then a later call to
<code>
write
()</code> will
fail and return -1.</p>
+
<p>
If
everything went fine, a call
to
<code>errno()</code>
directly afterwards
+
will return zero
.</p>
+
<p> If <code>data</code> is an array
of strings
,
they
will be
written
sequence
.</p>
+
<p>
If
more
than
one
argument
is
given,
<code>sprintf()</code>
will
be
used
to
+
format
them
using
<
code>format<
/
code
>
. If
<
code
>
format</code>
is
an
array,
the
strings
+
in
it are concatenated
and
the
result
is
used as format string
.</p>
</dd> <dt class='head--doc'>Note</dt> <dd class='body--doc'><p>Writing of wide strings is not supported. You have to encode the
1572:
<dt class='head--doc'>Description</dt> <dd class='body--doc'><p>Write out-of-band data to a stream.</p>
-
<p> Writes out-of-band data to a stream and returns how many bytes that were
-
actually written.</p>
+
<p> Writes out-of-band data to a stream and returns how many bytes
+
that were actually written.
It can be less than the size of the
+
given data if some data was written successfully and then
+
something went wrong.
</p>
+
<p> -1 is returned if something went wrong and no bytes were written.
+
If only some data was written due to an error and that error
+
persists, then a later call to <code>write_oob()</code> will fail and return -1.</p>
+
<p> If everything went fine, a call to <code>errno()</code> directly afterwards
+
will return zero.</p>
<p> If more than one argument is given, <code>sprintf()</code> will be used to format them.</p>
-
<p> -1 is returned if something went wrong and no bytes were written.</p>
+
</dd> <dt class='head--doc'>Note</dt> <dd class='body--doc'><p>Out-of-band data was not be supported on Pike 0.5 and earlier,