Branch: Tag:

2003-10-24

2003-10-24 17:44:33 by Martin Stjernholm <mast@lysator.liu.se>

Various small fixes.

Rev: src/modules/files/file.c:1.301

890:   <dt class='head--doc'>Description</dt>   <dd class='body--doc'><p>Read data from a file or a stream.</p>   <p> Attempts to read <code>len</code> bytes from the file, and return it as a -  string. Less than <code>len</code> bytes can be returned if</p> +  string. Less than <code>len</code> bytes can be returned if:</p>   <ul>   <li><p>end-of-file is encountered for a normal file, or</p> - </li><li><p>it's a socket or pipe that has been closed from the other end, or</p> - </li><li><p>nonblocking mode is used, or</p> + </li><li><p>it's a stream that has been closed from the other end, or</p> + </li><li><p>it's a stream in nonblocking mode, or</p> + </li><li><p>it's a stream and <code>not_all</code> is set, or</p>   </li><li><p><code>not_all</code> isn't set and an error occurred (see below).</p>   </li></ul><p>If <code>not_all</code> is nonzero, <code>read()</code> will not try its best to read    as many bytes as you have asked for, but will merely return as
953:      <dt class='head--doc'>Description</dt>   <dd class='body--doc'><p>Attempts to read <code>len</code> bytes of out-of-band data from the stream, -  and returns it as a string. Less than <code>len</code> bytes can be returned if</p> +  and returns it as a string. Less than <code>len</code> bytes can be returned +  if:</p>   <ul>   <li><p>the stream has been closed from the other end, or</p>   </li><li><p>nonblocking mode is used, or</p> -  + </li><li><p><code>not_all</code> is set, or</p>   </li><li><p><code>not_all</code> isn't set and an error occurred (see below).</p>   </li></ul><p>If <code>not_all</code> is nonzero, <code>read_oob()</code> will only return as many    bytes of out-of-band data as are currently 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. -  If the problem persists then a later call to <code>read()</code> will fail -  and return zero, however.</p> +  If the problem persists then a later call to <code>read_oob()</code> will +  fail and return zero, however.</p>   <p> If everything went fine, a call to <code>errno()</code> directly afterwards    will return zero. That includes an end due to remote close.</p>   <p> If no arguments are given, <code>read_oob()</code> will read to the end of