autodoc.git / traditional_manual / chapter_9.html

version» Context lines:

autodoc.git/traditional_manual/chapter_9.html:1452:    and not on Pike 0.6 through 7.4 if they were compiled with the    option <tt>'--without-oob'</tt>.</p>   </dd>   <dt class='head--doc'>See also</dt>   <dd class='body--doc'><p><code>set_blocking()</code>, <code>set_callbacks</code>, <code>set_read_callback()</code>,    <code>set_write_callback()</code>, <code>set_read_oob_callback()</code>,    <code>set_write_oob_callback()</code>, <code>set_close_callback()</code>    <code>set_nonblocking_keep_callbacks()</code>,    <code>set_blocking_keep_callbacks()</code></p>   </dd></dl> -  -  - <hr /> - <dl class='group--doc'> - <dt class='head--type'><span class='homogen--type'>Method</span> - <span class='homogen--name'><b>tcgetattr</b></span><br> - <span class='homogen--type'>Method</span> - <span class='homogen--name'><b>tcsetattr</b></span><br> - </dt> - <dd><p><code><code class='datatype'>mapping</code> <b><span class='method'>tcgetattr</span>(</b><b>)</b></code><br> - <code><code class='datatype'>int</code> <b><span class='method'>tcsetattr</span>(</b><code class='datatype'>mapping</code> <code class='argument'>attr</code><b>)</b></code><br> - <code><code class='datatype'>int</code> <b><span class='method'>tcsetattr</span>(</b><code class='datatype'>mapping</code> <code class='argument'>attr</code>, <code class='datatype'>string</code> <code class='argument'>when</code><b>)</b></code></p></dd> -  - <dt class='head--doc'>Description</dt> - <dd class='body--doc'><p>Gets/sets term attributes. The returned value/the <code>attr</code> parameter -  is a mapping on the form</p> - <table class='box'><tr><td><code><code class='key'>"ispeed"</code> : <code class='datatype'>int(-1..)</code></code></td><td><p>In baud rate.</p> - </td></tr> - <tr><td><code><code class='key'>"ospeed"</code> : <code class='datatype'>int(-1..)</code></code></td><td><p>Out baud rate.</p> - </td></tr> - <tr><td><code><code class='key'>"csize"</code> : <code class='datatype'>int(-1..-1)</code>|<code class='datatype'>int(5..8)</code></code></td><td><p>Character size in bits.</p> - </td></tr> - <tr><td><code><code class='key'>"rows"</code> : <code class='datatype'>int</code></code></td><td><p>Terminal rows.</p> - </td></tr> - <tr><td><code><code class='key'>"columns"</code> : <code class='datatype'>int</code></code></td><td><p>Terminal columns.</p> - </td></tr> - <tr><td><code><code class='key'>flag_name</code> : <code class='datatype'>bool</code></code></td><td><p>The value of a named flag. The flag name is -  the string describing the termios flags (IGNBRK, BRKINT, -  IGNPAR, PARMRK, INPCK, ISTRIP, INLCR, IGNCR, ICRNL, IUCLC, -  IXON, IXANY, IXOFF, IMAXBEL, OPOST, OLCUC, ONLCR, OCRNL, -  ONOCR, ONLRET, OFILL, OFDEL, OXTABS, ONOEOT, CSTOPB, CREAD, -  PARENB, PARODD, HUPCL, CLOCAL, CRTSCTS, ISIG, ICANON, XCASE, -  ECHO, ECHOE, ECHOK, ECHONL, ECHOCTL, ECHOPRT, ECHOKE, FLUSHO, -  NOFLSH, TOSTOP, PENDIN). See the manpage for termios or -  other documentation for more information. All flags are not -  available on all platforms.</p> - </td></tr> - <tr><td><code><code class='key'>character_name</code> : <code class='datatype'>int(8bit)</code></code></td><td><p>Sets the value of a control character (VINTR, VQUIT, VERASE, -  VKILL, VEOF, VTIME, VMIN, VSWTC, VSTART, VSTOP, VSUSP, VEOL, -  VREPRINT, VDISCARD, VWERASE, VLNEXT, VEOL2). All control -  characters are not available on all platforms.</p> - </td></tr> - </table><p>Negative values are not allowed as indata, but might appear in the -  result from <code>tcgetattr</code> when the actual value is unknown. <code>tcsetattr</code> -  returns 0 if failed.</p> - <p> The argument <code>when</code> to <code>tcsetattr</code> describes when the -  changes are to take effect:</p> - <table class='box'><tr><td><code><code class='key'>"TCSANOW"</code></code></td><td><p>The change occurs immediately (default).</p> - </td></tr> - <tr><td><code><code class='key'>"TCSADRAIN"</code></code></td><td><p>The change occurs after all output has been written.</p> - </td></tr> - <tr><td><code><code class='key'>"TCSAFLUSH"</code></code></td><td><p>The change occurs after all output has been written, -  and empties input buffers.</p> - </td></tr> - </table> - </dd> - <dt class='head--doc'>Example</dt> - <dd class='example'><pre><p>// setting the terminal in raw mode: -  Stdio.stdin-&gt;tcsetattr((["ECHO":0,"ICANON":0,"VMIN":0,"VTIME":0]));</p> - </pre></dd> - <dt class='head--doc'>Note</dt> - <dd class='body--doc'><p>Unknown flags are ignored by <code>tcsetattr()</code>. <code>tcsetattr</code> always -  changes the attribute, so only include attributes that actually -  should be altered in the attribute mapping.</p> - </dd> - <dt class='head--doc'>Bugs</dt> - <dd class='body--doc'><p>Terminal rows and columns setting by <code>tcsetattr()</code> is not -  currently supported.</p> - </dd></dl> +    </dd></dl><dl><dt><h2 class='header'>Class <b class='ms datatype'>Stdio.FILE</b></h2>   </dt><dd><dl class='group--doc'>   <dt class='head--doc'>Description</dt>   <dd class='body--doc'><p><code>Stdio.FILE</code> is a buffered version of <code>Stdio.File</code>, it inherits    <code>Stdio.File</code> and has most of the functionality of <code>Stdio.File</code>.    However, it has an input buffer that allows line-by-line input.</p>   <p> It also has support for automatic charset conversion for both input    and output (see <code>Stdio.FILE()-&gt;set_charset()</code>).</p>   </dd>   <dt class='head--doc'>Note</dt>
autodoc.git/traditional_manual/chapter_9.html:8375:    <code>close</code> is called.</p>   </dd>   <dt class='head--doc'>See also</dt>   <dd class='body--doc'><p><code>release_fd()</code></p>   </dd></dl>         <hr />   <dl class='group--doc'>   <dt class='head--type'><span class='homogen--type'>Method</span> + <span class='homogen--name'><b>tcdrain</b></span> + </dt> + <dd><p><code><code class='datatype'>bool</code> <b><span class='method'>tcdrain</span>(</b><b>)</b></code></p></dd> +  + <dt class='head--doc'>Description</dt> + <dd class='body--doc'><p>Wait for transmission buffers to empty.</p> + </dd> + <dt class='head--doc'>Returns</dt> + <dd class='body--doc'><p>Returns <code class='expr'>1</code> on success and <code class='expr'>0</code> (zero) on failure.</p> + </dd> + <dt class='head--doc'>See also</dt> + <dd class='body--doc'><p><code>tcflush()</code></p> + </dd></dl> +  +  + <hr /> + <dl class='group--doc'> + <dt class='head--type'><span class='homogen--type'>Method</span> + <span class='homogen--name'><b>tcflush</b></span> + </dt> + <dd><p><code><code class='datatype'>bool</code> <b><span class='method'>tcflush</span>(</b><code class='datatype'>string</code>|<code class='datatype'>void</code> <code class='argument'>flush_direction</code><b>)</b></code></p></dd> +  + <dt class='head--doc'>Description</dt> + <dd class='body--doc'><p>Flush queued terminal control messages.</p> + </dd> + <dt class='head--doc'><span id='p-flush_direction'></span>Parameter <code class='parameter'>flush_direction</code></dt> + <dd></dd><dd class='body--doc'><table class='box'><tr><td><code><code class='key'>"TCIFLUSH"</code></code></td><td><p>Flush received but not read.</p> + </td></tr> + <tr><td><code><code class='key'>"TCOFLUSH"</code></code></td><td><p>Flush written but not transmitted.</p> + </td></tr> + <tr><td><code><code class='key'>"TCIOFLUSH"</code></code></td><td><p>Flush both of the above. Default.</p> + </td></tr> + </table> + </dd> + <dt class='head--doc'>Returns</dt> + <dd class='body--doc'><p>Returns <code class='expr'>1</code> on success and <code class='expr'>0</code> (zero) on failure.</p> + </dd> + <dt class='head--doc'>See also</dt> + <dd class='body--doc'><p><code>tcdrain()</code></p> + </dd></dl> +  +  + <hr /> + <dl class='group--doc'> + <dt class='head--type'><span class='homogen--type'>Method</span> + <span class='homogen--name'><b>tcgetattr</b></span><br> + <span class='homogen--type'>Method</span> + <span class='homogen--name'><b>tcsetattr</b></span><br> + </dt> + <dd><p><code><code class='datatype'>mapping</code> <b><span class='method'>tcgetattr</span>(</b><b>)</b></code><br> + <code><code class='datatype'>int</code> <b><span class='method'>tcsetattr</span>(</b><code class='datatype'>mapping</code> <code class='argument'>attr</code><b>)</b></code><br> + <code><code class='datatype'>int</code> <b><span class='method'>tcsetattr</span>(</b><code class='datatype'>mapping</code> <code class='argument'>attr</code>, <code class='datatype'>string</code> <code class='argument'>when</code><b>)</b></code></p></dd> +  + <dt class='head--doc'>Description</dt> + <dd class='body--doc'><p>Gets/sets term attributes. The returned value/the <code>attr</code> parameter +  is a mapping on the form</p> + <table class='box'><tr><td><code><code class='key'>"ispeed"</code> : <code class='datatype'>int(-1..)</code></code></td><td><p>In baud rate.</p> + </td></tr> + <tr><td><code><code class='key'>"ospeed"</code> : <code class='datatype'>int(-1..)</code></code></td><td><p>Out baud rate.</p> + </td></tr> + <tr><td><code><code class='key'>"csize"</code> : <code class='datatype'>int(-1..-1)</code>|<code class='datatype'>int(5..8)</code></code></td><td><p>Character size in bits.</p> + </td></tr> + <tr><td><code><code class='key'>"rows"</code> : <code class='datatype'>int</code></code></td><td><p>Terminal rows.</p> + </td></tr> + <tr><td><code><code class='key'>"columns"</code> : <code class='datatype'>int</code></code></td><td><p>Terminal columns.</p> + </td></tr> + <tr><td><code><code class='key'>flag_name</code> : <code class='datatype'>bool</code></code></td><td><p>The value of a named flag. The flag name is +  the string describing the termios flags (IGNBRK, BRKINT, +  IGNPAR, PARMRK, INPCK, ISTRIP, INLCR, IGNCR, ICRNL, IUCLC, +  IXON, IXANY, IXOFF, IMAXBEL, OPOST, OLCUC, ONLCR, OCRNL, +  ONOCR, ONLRET, OFILL, OFDEL, OXTABS, ONOEOT, CSTOPB, CREAD, +  PARENB, PARODD, HUPCL, CLOCAL, CRTSCTS, ISIG, ICANON, XCASE, +  ECHO, ECHOE, ECHOK, ECHONL, ECHOCTL, ECHOPRT, ECHOKE, FLUSHO, +  NOFLSH, TOSTOP, PENDIN). See the manpage for termios or +  other documentation for more information. All flags are not +  available on all platforms.</p> + </td></tr> + <tr><td><code><code class='key'>character_name</code> : <code class='datatype'>int(8bit)</code></code></td><td><p>Sets the value of a control character (VINTR, VQUIT, VERASE, +  VKILL, VEOF, VTIME, VMIN, VSWTC, VSTART, VSTOP, VSUSP, VEOL, +  VREPRINT, VDISCARD, VWERASE, VLNEXT, VEOL2). All control +  characters are not available on all platforms.</p> + </td></tr> + </table><p>Negative values are not allowed as indata, but might appear in the +  result from <code>tcgetattr</code> when the actual value is unknown. <code>tcsetattr</code> +  returns 0 if failed.</p> + <p> The argument <code>when</code> to <code>tcsetattr</code> describes when the +  changes are to take effect:</p> + <table class='box'><tr><td><code><code class='key'>"TCSANOW"</code></code></td><td><p>The change occurs immediately (default).</p> + </td></tr> + <tr><td><code><code class='key'>"TCSADRAIN"</code></code></td><td><p>The change occurs after all output has been written.</p> + </td></tr> + <tr><td><code><code class='key'>"TCSAFLUSH"</code></code></td><td><p>The change occurs after all output has been written, +  and empties input buffers.</p> + </td></tr> + </table> + </dd> + <dt class='head--doc'>Example</dt> + <dd class='example'><pre><p>// setting the terminal in raw mode: +  Stdio.stdin-&gt;tcsetattr((["ECHO":0,"ICANON":0,"VMIN":0,"VTIME":0]));</p> + </pre></dd> + <dt class='head--doc'>Note</dt> + <dd class='body--doc'><p>Unknown flags are ignored by <code>tcsetattr()</code>. <code>tcsetattr</code> always +  changes the attribute, so only include attributes that actually +  should be altered in the attribute mapping.</p> + </dd> + <dt class='head--doc'>Bugs</dt> + <dd class='body--doc'><p>Terminal rows and columns setting by <code>tcsetattr()</code> is not +  currently supported.</p> + </dd> + <dt class='head--doc'>See also</dt> + <dd class='body--doc'><p><code>tcsetsize()</code></p> + </dd></dl> +  +  + <hr /> + <dl class='group--doc'> + <dt class='head--type'><span class='homogen--type'>Method</span> + <span class='homogen--name'><b>tcsendbreak</b></span> + </dt> + <dd><p><code><code class='datatype'>bool</code> <b><span class='method'>tcsendbreak</span>(</b><code class='datatype'>int</code>|<code class='datatype'>void</code> <code class='argument'>duration</code><b>)</b></code></p></dd> +  + <dt class='head--doc'>Description</dt> + <dd class='body--doc'><p>Send a break signal.</p> + </dd> + <dt class='head--doc'><span id='p-duration'></span>Parameter <code class='parameter'>duration</code></dt> + <dd></dd><dd class='body--doc'><p>Duration to send the signal for. <code class='expr'>0</code> (zero) causes +  a break signal to be sent for between 0.25 and 0.5 seconds. +  Other values are operating system dependent:</p> + <dl class='group--doc'><dt>SunOS</dt> + <dd><p>The number of joined break signals as above.</p> + </dd> + <dt>Linux, AIX, Digital Unix, Tru64</dt> + <dd><p>The time in milliseconds.</p> + </dd> + <dt>FreeBSD, NetBSD, HP-UX, MacOS</dt> + <dd><p>The value is ignored.</p> + </dd> + <dt>Solaris, Unixware</dt> + <dd><p>The behavior is changed to be similar to <code>tcdrain()</code>.</p> + </dd> + </dl> + </dd> + <dt class='head--doc'>Returns</dt> + <dd class='body--doc'><p>Returns <code class='expr'>1</code> on success and <code class='expr'>0</code> (zero) on failure.</p> + </dd></dl> +  +  + <hr /> + <dl class='group--doc'> + <dt class='head--type'><span class='homogen--type'>Method</span> + <span class='homogen--name'><b>tcsetsize</b></span> + </dt> + <dd><p><code><code class='datatype'>bool</code> <b><span class='method'>tcsetsize</span>(</b><code class='datatype'>int</code> <code class='argument'>rows</code>, <code class='datatype'>int</code> <code class='argument'>cols</code><b>)</b></code></p></dd> +  + <dt class='head--doc'>Description</dt> + <dd class='body--doc'><p>Set the number of rows and columns for a terminal.</p> + </dd> + <dt class='head--doc'>Returns</dt> + <dd class='body--doc'><p>Returns <code class='expr'>1</code> on success and <code class='expr'>0</code> (zero) on failure.</p> + </dd> + <dt class='head--doc'>See also</dt> + <dd class='body--doc'><p><code>tcgetattr()</code>, <code>tcsetattr()</code></p> + </dd></dl> +  +  + <hr /> + <dl class='group--doc'> + <dt class='head--type'><span class='homogen--type'>Method</span>   <span class='homogen--name'><b>tell</b></span>   </dt>   <dd><p><code><code class='datatype'>int</code> <b><span class='method'>tell</span>(</b><b>)</b></code></p></dd>      <dt class='head--doc'>Description</dt>   <dd class='body--doc'><p>Returns the current offset in the file.</p>   </dd>   <dt class='head--doc'>See also</dt>   <dd class='body--doc'><p><code>seek()</code></p>   </dd></dl>