TAPE: Stub extended gap behaviors to avoid link time errors.

This commit is contained in:
Mark Pizzolato 2017-03-20 23:05:47 -07:00
parent 3eb4598456
commit 2d1b969cb7
2 changed files with 47 additions and 0 deletions

View file

@ -129,6 +129,8 @@ static t_stat sim_tape_simh_check (UNIT *uptr);
static t_stat sim_tape_e11_check (UNIT *uptr); static t_stat sim_tape_e11_check (UNIT *uptr);
static t_addr sim_tape_tpc_fnd (UNIT *uptr, t_addr *map); static t_addr sim_tape_tpc_fnd (UNIT *uptr, t_addr *map);
static void sim_tape_data_trace (UNIT *uptr, const uint8 *data, size_t len, const char* txt, int detail, uint32 reason); static void sim_tape_data_trace (UNIT *uptr, const uint8 *data, size_t len, const char* txt, int detail, uint32 reason);
static t_stat tape_erase_fwd (UNIT *uptr, t_mtrlnt gap_size);
static t_stat tape_erase_rev (UNIT *uptr, t_mtrlnt gap_size);
struct tape_context { struct tape_context {
@ -1621,6 +1623,44 @@ AIO_CALL(TOP_RDRR, NULL, NULL, NULL, 0, 0, gaplen, 0, NULL, callback);
return r; return r;
} }
/* Erase a record forward.
An erase gap is written in the forward direction on the tape unit specified
by "uptr" for a length corresponding to a record containing the number of
bytes specified by "bc", and the status of the operation is returned. The
resulting gap will occupy "bc" bytes plus the size of the record length
metadata. This function may be used to erase a record of length "n" in place
by requesting a gap of length "n". After erasure, the tape will be
positioned at the end of the gap.
*/
t_stat sim_tape_errecf (UNIT *uptr, t_mtrlnt bc)
{
const t_mtrlnt meta_size = sizeof (t_mtrlnt); /* the number of bytes per metadatum */
const t_mtrlnt gap_size = bc + 2 * meta_size; /* the requested gap size in bytes */
return MTSE_IOERR; /* stub return */
}
/* Erase a record reverse.
An erase gap is written in the reverse direction on the tape unit specified
by "uptr" for a length corresponding to a record containing the number of
bytes specified by "bc", and the status of the operation is returned. The
resulting gap will occupy "bc" bytes plus the size of the record length
metadata. This function may be used to erase a record of length "n" in place
by requesting a gap of length "n". After erasure, the tape will be
positioned at the start of the gap.
*/
t_stat sim_tape_errecr (UNIT *uptr, t_mtrlnt bc)
{
const t_mtrlnt meta_size = sizeof (t_mtrlnt); /* the number of bytes per metadatum */
const t_mtrlnt gap_size = bc + 2 * meta_size; /* the requested gap size in bytes */
return MTSE_IOERR; /* stub return */
}
/* Space record forward /* Space record forward
Inputs: Inputs:

View file

@ -23,6 +23,11 @@
used in advertising or otherwise to promote the sale, use or other dealings used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik. in this Software without prior written authorization from Robert M Supnik.
18-Jul-16 JDB Added sim_tape_errecf, sim_tape_errecr functions
15-Dec-14 JDB Added tape density validity flags
04-Nov-14 JDB Added tape density flags
11-Oct-14 JDB Added reverse read half gap, set/show density
22-Sep-14 JDB Added tape runaway support
23-Jan-12 MP Added support for Logical EOT detection while positioning 23-Jan-12 MP Added support for Logical EOT detection while positioning
05-Feb-11 MP Add Asynch I/O support 05-Feb-11 MP Add Asynch I/O support
30-Aug-06 JDB Added erase gap support 30-Aug-06 JDB Added erase gap support
@ -170,6 +175,8 @@ t_stat sim_tape_wreomrw (UNIT *uptr);
t_stat sim_tape_wreomrw_a (UNIT *uptr, TAPE_PCALLBACK callback); t_stat sim_tape_wreomrw_a (UNIT *uptr, TAPE_PCALLBACK callback);
t_stat sim_tape_wrgap (UNIT *uptr, uint32 gaplen); t_stat sim_tape_wrgap (UNIT *uptr, uint32 gaplen);
t_stat sim_tape_wrgap_a (UNIT *uptr, uint32 gaplen, TAPE_PCALLBACK callback); t_stat sim_tape_wrgap_a (UNIT *uptr, uint32 gaplen, TAPE_PCALLBACK callback);
t_stat sim_tape_errecf (UNIT *uptr, t_mtrlnt bc);
t_stat sim_tape_errecr (UNIT *uptr, t_mtrlnt bc);
t_stat sim_tape_sprecf (UNIT *uptr, t_mtrlnt *bc); t_stat sim_tape_sprecf (UNIT *uptr, t_mtrlnt *bc);
t_stat sim_tape_sprecf_a (UNIT *uptr, t_mtrlnt *bc, TAPE_PCALLBACK callback); t_stat sim_tape_sprecf_a (UNIT *uptr, t_mtrlnt *bc, TAPE_PCALLBACK callback);
t_stat sim_tape_sprecsf (UNIT *uptr, uint32 count, uint32 *skipped); t_stat sim_tape_sprecsf (UNIT *uptr, uint32 count, uint32 *skipped);