Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

IOS_$SEEK                         Domain/OS                          IOS_$SEEK


NAME
     ios_$seek - seek on a stream

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/ios.h>

     void ios_$seek(
          ios_$id_t &stream_id,
          ios_$abs_rel_t &abs_rel,
          ios_$seek_type_t &seek_type,
          long &offset,
          status_$t *status)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/ios.ins.pas';

     procedure ios_$seek(
          in stream_id: ios_$id_t;
          in abs_rel: ios_$abs_rel_t;
          in seek_type: ios_$seek_type_t;
          in offset: integer32;
          out status: status_$t);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/ios.ins.ftn'

           integer*2 stream_id, abs_rel, seek_type
           integer*4 offset, status

           call ios_$seek(stream_id, abs_rel, seek_type, offset, status)

DESCRIPTION
     Ios_$seek seeks to an absolute or relative byte or record position in an
     object.  Use this call with the ios_$inq_byte_pos and ios_$inq_rec_pos
     calls to seek to any relative or absolute position on a stream.

     stream_id
          The ID of the stream on which to seek.

     abs_rel
          Specify one of the following:

          ios_$absolute
               Seek relative to the beginning of the object (BOF) or the end
               of the object (EOF), depending on the sign of offset.

          ios_$relative
               Seek relative to the current stream marker.

     seek_type
          The type of seek desired.  Specify one of the following:

          ios_$rec_seek
               A record-oriented seek.  The value in offset is in records.

          ios_$byte_seek
               A byte-oriented seek.  The value in offset is in bytes.

     offset
          A signed integer indicating the number of records or bytes from the
          seek base to position the stream marker.

          If abs_rel is ios_$absolute and offset is positive, then ios_$seek
          seeks forward from BOF.  If abs_rel is ios_$absolute and offset is
          negative, then ios_$seek seeks backward from EOF.

          If abs_rel is ios_$relative, then a positive offset causes ios_$seek
          to seek forward from the current stream marker, and a negative
          offset causes ios_$seek to seek backward from the current stream
          marker.

     status
          The completion status.

NOTES
     Both ios_$inq_byte_pos and ios_$inq_rec_pos return good bases for the
     offset passed to ios_$seek.

SEE ALSO
     ios_$seek_full_key, ios_$seek_short_key.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026