<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
<!DOCTYPE interface-description SYSTEM 'file:///usr/pkgsrc/lang/oo2c/work.macaroon/oo2c_32-2.0.11/rsrc/OOC/xml/interface-description.dtd'>
<interface-description name='StdChannels' id=''>
  <oberon-doc>
    <summary>Standard channels corresponding to the the standard file descriptors <samp>stdin</samp>, <samp>stdout</samp>, <samp>stderr</samp>, and the pseudo channel <samp>/dev/null</samp>.</summary>
    <p pad-after='yes' no-indent='yes'>Standard channels corresponding to the the standard file descriptors <samp>stdin</samp>, <samp>stdout</samp>, <samp>stderr</samp>, and the pseudo channel <samp>/dev/null</samp>.</p>
    <p pad-after='yes' no-indent='no'>Standard channels do not have to be opened by a client program since they are already open and ready for use.  Under some operating system they may be connected to sources and destinations specified before the program is run, while on a stand-alone system they may be connected to a console terminal.</p>
    <p pad-after='yes' no-indent='no'>The standard channels (stdin, stdout, stderr) should never be closed and the values used to identify standard channels should be constant throughout the execution of the program.</p>
  </oberon-doc>
  <import-decl name='Channel' id='Channel' export='no' module='Channel'/>
  <import-decl name='Time' id='Time' export='no' module='Time'/>
  <import-decl name='SYSTEM' id='SYSTEM' export='no' module='SYSTEM'/>
  <var-decl name='stdin' id='stdin' export='read-only'>
    <oberon-doc>
      <summary>Standard input.</summary>
      <p pad-after='yes' no-indent='yes'>Standard input.</p>
    </oberon-doc>
    <type>
      <type-name module='Channel' name='Channel' href='Channel#Channel'/>
    </type>
  </var-decl>
  <var-decl name='stdout' id='stdout' export='read-only'>
    <oberon-doc>
      <summary>Standard output.</summary>
      <p pad-after='yes' no-indent='yes'>Standard output.</p>
    </oberon-doc>
    <type>
      <type-name module='Channel' name='Channel' href='Channel#Channel'/>
    </type>
  </var-decl>
  <var-decl name='stderr' id='stderr' export='read-only'>
    <oberon-doc>
      <summary>Standard error output.</summary>
      <p pad-after='yes' no-indent='yes'>Standard error output.</p>
    </oberon-doc>
    <type>
      <type-name module='Channel' name='Channel' href='Channel#Channel'/>
    </type>
  </var-decl>
  <var-decl name='null' id='null' export='read-only'>
    <oberon-doc>
      <summary>Null channel.</summary>
      <p pad-after='yes' no-indent='yes'>Null channel.  Write only, accepts arbitrary input.</p>
    </oberon-doc>
    <type>
      <type-name name='NullChannel' href='#NullChannel'/>
    </type>
  </var-decl>
  <import-decl name='-RT0' id='-RT0' export='no' module='RT0'/>
  <import-decl name='-Object' id='-Object' export='no' module='Object'/>
  <import-decl name='-Exception' id='-Exception' export='no' module='Exception'/>
  <class name='NullChannel'>
    <type-decl name='NullChannel' id='NullChannel' export='no'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='NullChannelDesc' href='#NullChannelDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='NullChannelDesc' id='NullChannelDesc' export='no'>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='Length' id='NullChannelDesc.Length' export='yes'>
      <doc-inherited-from module='Channel' name='Length' class='Channel' href='Channel#ChannelDesc.Length'/>
      <oberon-doc>
        <summary>Result is the number of bytes of data that this channel refers to.</summary>
        <p pad-after='yes' no-indent='yes'>Result is the number of bytes of data that this channel refers to.  If <oberon-param href='#NullChannelDesc.Length.ch'>ch</oberon-param> represents a file, then this value is the file's size.  If <oberon-param href='#NullChannelDesc.Length.ch'>ch</oberon-param> has no fixed length (e.g. because it's interactive), the result is <oberon-const href='Channel#noLength'>noLength</oberon-const>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='NullChannelDesc.Length.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='NullChannel' href='#NullChannel'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='#predef' name='LONGINT'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='Channel' name='Length' class='Channel' href='Channel#ChannelDesc.Length'/>
    </procedure>
    <procedure name='GetModTime' id='NullChannelDesc.GetModTime' export='yes'>
      <doc-inherited-from module='Channel' name='GetModTime' class='Channel' href='Channel#ChannelDesc.GetModTime'/>
      <oberon-doc>
        <summary>Retrieves the modification time of the data accessed by the given channel.</summary>
        <p pad-after='yes' no-indent='yes'>Retrieves the modification time of the data accessed by the given channel.  If no such information is avaiblable, <oberon-field href='Channel#ChannelDesc.res'>ch.res</oberon-field> is set to <oberon-const href='Channel#noModTime'>noModTime</oberon-const>, otherwise to <oberon-const href='Channel#done'>done</oberon-const>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='NullChannelDesc.GetModTime.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='NullChannel' href='#NullChannel'/>
          </type>
        </receiver-decl>
        <parameter-decl name='mtime' id='NullChannelDesc.GetModTime.mtime' export='no' variable-parameter='yes'>
          <type>
            <type-name module='Time' name='TimeStamp' href='Time#TimeStamp'/>
          </type>
        </parameter-decl>
      </formal-parameters>
      <redefined-method module='Channel' name='GetModTime' class='Channel' href='Channel#ChannelDesc.GetModTime'/>
    </procedure>
    <procedure name='NewReader' id='NullChannelDesc.NewReader' export='yes'>
      <doc-inherited-from module='Channel' name='NewReader' class='Channel' href='Channel#ChannelDesc.NewReader'/>
      <oberon-doc>
        <summary>Attaches a new reader to the channel <oberon-param href='#NullChannelDesc.NewReader.ch'>ch</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Attaches a new reader to the channel <oberon-param href='#NullChannelDesc.NewReader.ch'>ch</oberon-param>.  It is placed at the very start of the channel, and its <oberon-field href='Channel#ReaderDesc.res'>Reader.res</oberon-field> field is initialized to <oberon-const href='Channel#done'>done</oberon-const>.  <oberon-field href='Channel#ChannelDesc.res'>ch.res</oberon-field> is set to <oberon-const href='Channel#done'>done</oberon-const> on success and the new reader is returned.  Otherwise result is <code>NIL</code> and <oberon-field href='Channel#ChannelDesc.res'>ch.res</oberon-field> is changed to indicate the error cause.  Note that always the same reader is returned if the channel does not support multiple reading positions.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='NullChannelDesc.NewReader.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='NullChannel' href='#NullChannel'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='Channel' name='Reader' href='Channel#Reader'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='Channel' name='NewReader' class='Channel' href='Channel#ChannelDesc.NewReader'/>
    </procedure>
    <procedure name='NewWriter' id='NullChannelDesc.NewWriter' export='yes'>
      <doc-inherited-from module='Channel' name='NewWriter' class='Channel' href='Channel#ChannelDesc.NewWriter'/>
      <oberon-doc>
        <summary>Attaches a new writer to the channel <oberon-param href='#NullChannelDesc.NewWriter.ch'>ch</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Attaches a new writer to the channel <oberon-param href='#NullChannelDesc.NewWriter.ch'>ch</oberon-param>.  It is placed at the very start of the channel, and its <oberon-field href='Channel#WriterDesc.res'>Writer.res</oberon-field> field is initialized to <oberon-const href='Channel#done'>done</oberon-const>.  <oberon-field href='Channel#ChannelDesc.res'>ch.res</oberon-field> is set to <oberon-const href='Channel#done'>done</oberon-const> on success and the new writer is returned.  Otherwise result is <code>NIL</code> and <oberon-field href='Channel#ChannelDesc.res'>ch.res</oberon-field> is changed to indicate the error cause.  Note that always the same reader is returned if the channel does not support multiple writing positions.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='NullChannelDesc.NewWriter.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='NullChannel' href='#NullChannel'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='Channel' name='Writer' href='Channel#Writer'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='Channel' name='NewWriter' class='Channel' href='Channel#ChannelDesc.NewWriter'/>
    </procedure>
    <procedure name='Flush' id='NullChannelDesc.Flush' export='yes'>
      <doc-inherited-from module='Channel' name='Flush' class='Channel' href='Channel#ChannelDesc.Flush'/>
      <oberon-doc>
        <summary>Flushes all buffers related to this channel.</summary>
        <p pad-after='yes' no-indent='yes'>Flushes all buffers related to this channel.  Any pending write operations are passed to the underlying OS and all buffers are marked as invalid.  The next read operation will get its data directly from the channel instead of the buffer.  If a writing error occurs during flushing, the field <oberon-field href='Channel#ChannelDesc.res'>ch.res</oberon-field> will be changed to <oberon-const href='Channel#writeError'>writeError</oberon-const>, otherwise it's assigned <oberon-const href='Channel#done'>done</oberon-const>.  Note that you have to check the channel's <oberon-field href='Channel#ChannelDesc.res'>Channel.res</oberon-field> flag after an explicit flush yourself, since none of the attached writers will notice any write error in this case.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='NullChannelDesc.Flush.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='NullChannel' href='#NullChannel'/>
          </type>
        </receiver-decl>
      </formal-parameters>
      <redefined-method module='Channel' name='Flush' class='Channel' href='Channel#ChannelDesc.Flush'/>
    </procedure>
    <procedure name='Close' id='NullChannelDesc.Close' export='yes'>
      <doc-inherited-from module='Channel' name='Close' class='Channel' href='Channel#ChannelDesc.Close'/>
      <oberon-doc>
        <summary>Flushes all buffers associated with <oberon-param href='#NullChannelDesc.Close.ch'>ch</oberon-param>, closes the channel, and frees all system resources allocated to it.</summary>
        <p pad-after='yes' no-indent='yes'>Flushes all buffers associated with <oberon-param href='#NullChannelDesc.Close.ch'>ch</oberon-param>, closes the channel, and frees all system resources allocated to it.  This invalidates all riders attached to <oberon-param href='#NullChannelDesc.Close.ch'>ch</oberon-param>, and they can't be used further.  On success, i.e. if all read and write operations (including flush) completed successfully, <oberon-field href='Channel#ChannelDesc.res'>ch.res</oberon-field> is set to <oberon-const href='Channel#done'>done</oberon-const>.  An opened channel can only be closed once, successive calls of <oberon-proc href='Channel#ChannelDesc.Close'>Channel.Close</oberon-proc> are undefined.  Note that unlike the Oberon System all opened channels have to be closed explicitly.  Otherwise resources allocated to them will remain blocked.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='ch' id='NullChannelDesc.Close.ch' export='no' variable-parameter='no'>
          <type>
            <type-name name='NullChannel' href='#NullChannel'/>
          </type>
        </receiver-decl>
      </formal-parameters>
      <redefined-method module='Channel' name='Close' class='Channel' href='Channel#ChannelDesc.Close'/>
    </procedure>
    <base-class module='Channel' class='Channel' href='Channel#Channel'>
      <inherited-method module='Channel' name='ClearError' class='Channel' href='Channel#ChannelDesc.ClearError'/>
      <inherited-method module='Channel' name='Close' class='Channel' href='Channel#ChannelDesc.Close'/>
      <inherited-method module='Channel' name='Flush' class='Channel' href='Channel#ChannelDesc.Flush'/>
      <inherited-method module='Channel' name='GetModTime' class='Channel' href='Channel#ChannelDesc.GetModTime'/>
      <inherited-method module='Channel' name='Length' class='Channel' href='Channel#ChannelDesc.Length'/>
      <inherited-method module='Channel' name='NewReader' class='Channel' href='Channel#ChannelDesc.NewReader'/>
      <inherited-method module='Channel' name='NewWriter' class='Channel' href='Channel#ChannelDesc.NewWriter'/>
      <inherited-field module='Channel' name='open' class='Channel' href='Channel#ChannelDesc.open'/>
      <inherited-field module='Channel' name='readable' class='Channel' href='Channel#ChannelDesc.readable'/>
      <inherited-field module='Channel' name='res' class='Channel' href='Channel#ChannelDesc.res'/>
      <inherited-field module='Channel' name='writable' class='Channel' href='Channel#ChannelDesc.writable'/>
    </base-class>
  </class>
  <class name='Writer'>
    <type-decl name='Writer' id='Writer' export='no'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='WriterDesc' href='#WriterDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='WriterDesc' id='WriterDesc' export='no'>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='Pos' id='WriterDesc.Pos' export='yes'>
      <doc-inherited-from module='Channel' name='Pos' class='Writer' href='Channel#WriterDesc.Pos'/>
      <oberon-doc>
        <summary>Returns the current writing position associated with the writer <oberon-param href='#WriterDesc.Pos.w'>w</oberon-param> in channel <oberon-field href='Channel#WriterDesc.base'>w.base</oberon-field>, i.e.</summary>
        <p pad-after='yes' no-indent='yes'>Returns the current writing position associated with the writer <oberon-param href='#WriterDesc.Pos.w'>w</oberon-param> in channel <oberon-field href='Channel#WriterDesc.base'>w.base</oberon-field>, i.e. the index of the first byte that is written by the next call to <oberon-proc href='Channel#WriterDesc.WriteByte'>Writer.WriteByte</oberon-proc> or <oberon-proc href='Channel#WriterDesc.WriteBytes'>Writer.WriteBytes</oberon-proc>.  This procedure will return <oberon-const href='Channel#noPosition'>noPosition</oberon-const> if the writer has no concept of a writing position (e.g. if it corresponds to output to terminal), otherwise the result is not negative.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='w' id='WriterDesc.Pos.w' export='no' variable-parameter='no'>
          <type>
            <type-name name='Writer' href='#Writer'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='#predef' name='LONGINT'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='Channel' name='Pos' class='Writer' href='Channel#WriterDesc.Pos'/>
    </procedure>
    <procedure name='SetPos' id='WriterDesc.SetPos' export='yes'>
      <doc-inherited-from module='Channel' name='SetPos' class='Writer' href='Channel#WriterDesc.SetPos'/>
      <oberon-doc>
        <summary>Sets the writing position to <oberon-param href='#WriterDesc.SetPos.newPos'>newPos</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Sets the writing position to <oberon-param href='#WriterDesc.SetPos.newPos'>newPos</oberon-param>.  A negative value of <oberon-param href='#WriterDesc.SetPos.newPos'>newPos</oberon-param> or calling this procedure for a writer that doesn't allow positioning will set `w.res' to <oberon-const href='Channel#outOfRange'>outOfRange</oberon-const>.  A value larger than the channel's length is legal, the following write operation will fill the gap between the end of the channel and this position with zero bytes.  Calls to this procedure while <samp>w.res # done</samp> will be ignored.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='w' id='WriterDesc.SetPos.w' export='no' variable-parameter='no'>
          <type>
            <type-name name='Writer' href='#Writer'/>
          </type>
        </receiver-decl>
        <parameter-decl name='newPos' id='WriterDesc.SetPos.newPos' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
      </formal-parameters>
      <redefined-method module='Channel' name='SetPos' class='Writer' href='Channel#WriterDesc.SetPos'/>
    </procedure>
    <procedure name='WriteByte' id='WriterDesc.WriteByte' export='yes'>
      <doc-inherited-from module='Channel' name='WriteByte' class='Writer' href='Channel#WriterDesc.WriteByte'/>
      <oberon-doc>
        <summary>Writes a single byte <oberon-param href='#WriterDesc.WriteByte.x'>x</oberon-param> to the channel <oberon-field href='Channel#WriterDesc.base'>w.base</oberon-field> at the writing position associated with <oberon-param href='#WriterDesc.WriteByte.w'>w</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Writes a single byte <oberon-param href='#WriterDesc.WriteByte.x'>x</oberon-param> to the channel <oberon-field href='Channel#WriterDesc.base'>w.base</oberon-field> at the writing position associated with <oberon-param href='#WriterDesc.WriteByte.w'>w</oberon-param>.  The writing position is moved forward by one byte on success, otherwise <oberon-field href='Channel#WriterDesc.res'>w.res</oberon-field> is changed to indicate the error cause.  <oberon-field href='Channel#WriterDesc.bytesWritten'>w.bytesWritten</oberon-field> will be <samp>1</samp> on success and <samp>0</samp> on failure.  Calls to this procedure while <samp>w.res # done</samp> will be ignored.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='w' id='WriterDesc.WriteByte.w' export='no' variable-parameter='no'>
          <type>
            <type-name name='Writer' href='#Writer'/>
          </type>
        </receiver-decl>
        <parameter-decl name='x' id='WriterDesc.WriteByte.x' export='no' variable-parameter='no'>
          <type>
            <type-name module='SYSTEM' name='BYTE' href='SYSTEM#BYTE'/>
          </type>
        </parameter-decl>
      </formal-parameters>
      <redefined-method module='Channel' name='WriteByte' class='Writer' href='Channel#WriterDesc.WriteByte'/>
    </procedure>
    <procedure name='WriteBytes' id='WriterDesc.WriteBytes' export='yes'>
      <doc-inherited-from module='Channel' name='WriteBytes' class='Writer' href='Channel#WriterDesc.WriteBytes'/>
      <oberon-doc>
        <summary>Writes <oberon-param href='#WriterDesc.WriteBytes.n'>n</oberon-param> bytes from <oberon-param href='#WriterDesc.WriteBytes.x'>x</oberon-param>, starting at position <oberon-param href='#WriterDesc.WriteBytes.start'>start</oberon-param>, to the channel <oberon-field href='Channel#WriterDesc.base'>w.base</oberon-field> at the writing position associated with <oberon-param href='#WriterDesc.WriteBytes.w'>w</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Writes <oberon-param href='#WriterDesc.WriteBytes.n'>n</oberon-param> bytes from <oberon-param href='#WriterDesc.WriteBytes.x'>x</oberon-param>, starting at position <oberon-param href='#WriterDesc.WriteBytes.start'>start</oberon-param>, to the channel <oberon-field href='Channel#WriterDesc.base'>w.base</oberon-field> at the writing position associated with <oberon-param href='#WriterDesc.WriteBytes.w'>w</oberon-param>.  The writing position is moved forward by <oberon-param href='#WriterDesc.WriteBytes.n'>n</oberon-param> bytes on success, otherwise <oberon-field href='Channel#WriterDesc.res'>w.res</oberon-field> is changed to indicate the error cause.  <oberon-field href='Channel#WriterDesc.bytesWritten'>w.bytesWritten</oberon-field> will hold the number of bytes that were actually written (being equal to <oberon-param href='#WriterDesc.WriteBytes.n'>n</oberon-param> on success).  Calls to this procedure while <samp>w.res # done</samp> will be ignored.</p>
        <pre-cond pad-after='yes'>
          <p pad-after='no' no-indent='yes'><samp>(n &gt;= 0) &amp; (0 &lt;= start) &amp; (start+n &lt;= LEN (x))</samp></p>
        </pre-cond>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='w' id='WriterDesc.WriteBytes.w' export='no' variable-parameter='no'>
          <type>
            <type-name name='Writer' href='#Writer'/>
          </type>
        </receiver-decl>
        <parameter-decl name='x' id='WriterDesc.WriteBytes.x' export='no' variable-parameter='no'>
          <type>
            <array>
              <element-type>
                <type-name module='SYSTEM' name='BYTE' href='SYSTEM#BYTE'/>
              </element-type>
            </array>
          </type>
        </parameter-decl>
        <parameter-decl name='start' id='WriterDesc.WriteBytes.start' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
        <parameter-decl name='n' id='WriterDesc.WriteBytes.n' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
      </formal-parameters>
      <redefined-method module='Channel' name='WriteBytes' class='Writer' href='Channel#WriterDesc.WriteBytes'/>
    </procedure>
    <base-class module='Channel' class='Writer' href='Channel#Writer'>
      <inherited-method module='Channel' name='ClearError' class='Writer' href='Channel#WriterDesc.ClearError'/>
      <inherited-method module='Channel' name='Pos' class='Writer' href='Channel#WriterDesc.Pos'/>
      <inherited-method module='Channel' name='SetPos' class='Writer' href='Channel#WriterDesc.SetPos'/>
      <inherited-method module='Channel' name='WriteByte' class='Writer' href='Channel#WriterDesc.WriteByte'/>
      <inherited-method module='Channel' name='WriteBytes' class='Writer' href='Channel#WriterDesc.WriteBytes'/>
      <inherited-field module='Channel' name='base' class='Writer' href='Channel#WriterDesc.base'/>
      <inherited-field module='Channel' name='bytesWritten' class='Writer' href='Channel#WriterDesc.bytesWritten'/>
      <inherited-field module='Channel' name='positionable' class='Writer' href='Channel#WriterDesc.positionable'/>
      <inherited-field module='Channel' name='res' class='Writer' href='Channel#WriterDesc.res'/>
    </base-class>
  </class>
  <module-ref name='Time'>
    <ref-target type='html' relative-uri='Time.html'/>
  </module-ref>
  <module-ref name='Channel'>
    <ref-target type='html' relative-uri='Channel.html'/>
  </module-ref>
</interface-description>
