c_tpfsr - Forward spaces over (count) records on tape

SYNTAX

#include "tapeio.h"

FUNCTION c_tpfsr (unit, count, mode)

     long     *unit;
     long     *count;
     long     *mode;

unit (input, integer)

Unit number to be used as a reference for the drive. This number is set by c_tpopen() and should not be altered.

count (input/output, integer)

Number of records to be skipped over. If end of file is encountered before all of the records are skipped, c_tpfsr() returns TAPE_EOF and count returns the number of records actually skipped. The tape is then positioned after the end of file.

mode (input, integer)

A value of NO_HANDLE (0) specifies that errors are to be returned to the calling program. A value of HANDLE (1) specifies that when an error occurs the routine is to return an error to the calling program and display a message to the terminal.

DESCRIPTION

The c_tpfsr() call is used to skip over count records on a tape device. Some examples of c_tpfsr() follow:

     Tape location before,             Tape location after call, 
     called with count = 1             returns TAPE_SUCC, count = 1
                 |                                        |
                 V                                        V
  ------------------------------     ------------------------------
  |   |E|    |E|     |E|   |E|E|     |   |E|    |E|     |E|   |E|E|
  |   |O|    |O|     |O|   |O|O|     |   |O|    |O|     |O|   |O|O|
  |   |R|    |R|     |R|   |F|F|     |   |R|    |R|     |R|   |F|F|
  ------------------------------     ------------------------------
     Tape location before,             Tape location after call, 
     called with count = 4             returns TAPE_EOV, count = 2
               |                                                |
               V                                                V
  ------------------------------     ------------------------------
  |   |E|    |E|     |E|   |E|E|     |   |E|    |E|     |E|   |E|E|
  |   |O|    |O|     |O|   |O|O|     |   |O|    |O|     |O|   |O|O|
  |   |R|    |R|     |R|   |F|F|     |   |R|    |R|     |R|   |F|F|
  ------------------------------     ------------------------------
     Tape location before,             Tape location after call,
     called with count = 4             returns TAPE_EOT, count = 2
               |                                                  |
               V                                                  V
  ------------------------------     ------------------------------
  |   |E|    |E|     |E|     |E|     |   |E|    |E|     |E|     |E|
  |   |O|    |O|     |O|     |O|     |   |O|    |O|     |O|     |O|
  |   |R|    |R|     |R|     |T|     |   |R|    |R|     |R|     |T|
  ------------------------------     ------------------------------

RETURN VALUE

c_tpfsr() returns

     TAPE_SUCC (0) -->  successful completion
     TPFSR_FSR -->  device error
     TAPE_EOV  -->  end of volume
     TAPE_EOF  -->  end of file
     TAPE_EOT  -->  end of tape

SPECIAL CONSIDERATIONS

c_tpfsr() does not work properly on the SUN II.

     Tape location before,             Tape location after call,
     called with count = 4             returns TAPE_EOT, count = 3
  |                                                           |
  V                                                           V
  ------------------------------     ------------------------------
  |    |E|     |E|       |E|E|E|     |    |E|     |E|       |E|E|E|
  |    |O|     |O|       |O|O|O|     |    |O|     |O|       |O|O|O|
  |    |R|     |R|       |F|F|F|     |    |R|     |R|       |F|F|F|
  ------------------------------     ------------------------------