(Note: Reducing compiler warnings across all, but primarily LP64
platforms, is a long term objective.)
Reduce compiler warnings on LP64 platforms (macOS, Windows) and 32-bit
builds (Win32). Prefer 'size_t' for pointer arithmetic, array indexing
and extents; 'int' hasn't been used for these purposes for many years
and across many ANSI standards. N.B. that conversions from int or int32
to size_t cause the compiler to zero-extend the value, which is
inefficient.
Refactor printf() format modifiers into sim_printf_fmts.h. Add the
SIZE_T_FMT modifier for better portability, especially on LP64 platforms
where size_t is unsigned long and sizeof(size_t) > sizeof(int).
3B2: Fix known size_t printf() format.
- Use tape->block_size uniformly for FIXED record length/block size
- Change tape_classify_file_contents() so the max_record_size for text
files does not include the line endings (fixes FIXED -B 80 failure when
reading 80- character card-images, fixes invalid ANSI HDR2 Record
Length for ANSI-VMS, ANSI-RSX11, and ANSI-VAR -B 512 when
reading 508-character lines)
- Distinguish RMS Record Size from ANSI Record Length: RMS Record
Size does not include the ANSI 'D' Record Format Record Control Word
(RCW); ANSI Record Length does
- Verify the ANSI Record Length is legal for text files
- Verify that the ANSI -B block size is large enough
- Write ANSI Record Length in HDR2 label, write RMS Record Size in
HDR3 label; whether they are the same or not depends on the ANSI
Record Format
- Pad ANSI short binary records with zeros (ANSI 'F' records must
all be the HDR2 Record Length)
- Minimum -B is 14 (shorter records on mag tapes are considered noise)
- Maximum -B is 65535 (DEC tape controllers have a 16-bit byte count register)
- Remove redundant setting of TAR default record size
- Notify the user when the -E option is being ignored
- Use the UNIT_RO format flag to set the SIMH ReadOnly attach option
- Use three tape marks to mark the end of a volume for RT-11 and RSTS
(ANSI and DOS11 formats); the third tape mark is harmless on RSX-11
and VMS, which only write two
- TAR -B must be a multiple of 512 (tar specifies the mag tape block size
in number of 512-byte records)
- The TAR file must exist
- Use a conditional test with the "is a MEMORY_TAPE image" invariant in
sim_tape.h to select the correct tape unit attach failure message
- Always print a tape attach summary message, like SIMH does for disks;
simplify and fix some of the other messages there
- Remove unnecessary memset()'s in dos11_copy_ascii_file()
- Fix a 16-bit integer overflow in the DOS label date calculation
- when the file ends on a block boundary, the block count was
off by one.
- always use the max_record_size in ANSI labels independent of
the ansi-type.
- Force the detection point of a tape structure error to be the logical EOM
on the tape.
- Enable SIGINT abort of a possibly long running validation scan
- Add -L detail record structure option at ATTACH time
- Add extra garbage at end of generated test data files
- Different systems used tape marks in different ways that are now
tolerated (multiple successive ones located on different parts of
the tape, etc.)
- Always validate beginning and end of record length indicators to avoid
moving into invalidly structured tape data