Commit graph

23 commits

Author SHA1 Message Date
Richard Cornwell
a58849613b SIM_CARD: Fixed issues caused by last commit to sim_card.c 2024-02-15 20:14:21 -05:00
B. Scott Michel
a275c71170 SCP: Reduce compiler warnings on LP64 platforms
(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.
2024-02-01 12:51:32 -05:00
Richard Cornwell
9c2c1117e8 SIM_CARD: Fixed to better detect mixed binary and ascii decks. 2023-10-09 20:27:42 -04:00
Mark Pizzolato
a4054f33b8 SCP: Add command argument passed into library unit test routines 2022-02-07 04:21:16 -08:00
Richard Cornwell
3a7a27f651 CARD: Added DEC029 translation table. 2020-11-17 22:05:42 -05:00
Richard Cornwell
47dbc558a2 CARD: Updated translation table. 2020-11-09 19:32:36 -05:00
Mark Pizzolato
c2059b0708 CARD: Improved help output distinguishing reader vs punch attach syntax 2020-11-06 11:55:20 -08:00
Mark Pizzolato
7f289b85f6 CARD: Update help to indicate multiple files may be attached at one time 2020-11-06 10:16:48 -08:00
Mark Pizzolato
9b1dea3a13 CARD: Minor adjustments for v3.x compatibility 2020-11-06 09:42:18 -08:00
Richard Cornwell
8998e5d495 CARD: Updated comments on raw and other special formats. 2020-09-22 12:13:26 -04:00
Mark Pizzolato
272bbd4551 CARD: Fix potential NULL pointer dereference
As reported in #920
2020-08-15 12:24:57 -07:00
Richard Cornwell
cc17f044f0 CARD: Clean up typo from Coverity fix. 2020-02-22 22:01:11 -05:00
Mark Pizzolato
9bc5014787 CARD: Avoid potential truncation warnings when allocating the deck buffer
Card decks will never be excessively large (> uint32) since there never
was a computer room big enough to hold that many cards. :-)

Hopper counts and size are all of type t_addr since they are referenced
relative to uptr->pos which tracks the hopper position.  That state is
managed so position is properly managed across a SAVE/RESTORE.

On some systems that use sim_card, t_addr is 64bits, hence
2020-01-18 10:44:16 -08:00
Mark Pizzolato
e7cf2a00ec CARD: Use proper int types for messages emitted
t_addr may not be an int equivalent type depending on simulator build
parameters.  Any messages for card activities will always be within int
bounds.
2019-12-30 13:16:30 -08:00
Richard Cornwell
bbfa391924 CARD: Cleanup coverity taint errors. 2019-11-03 18:53:07 -05:00
Richard Cornwell
bc01220e06 CARD: Fix translation error in 026 cards. 2019-08-12 07:34:55 -07:00
Richard Cornwell
0ef5776e52 CARD: Updated translation tables. 2019-01-13 22:38:24 -05:00
Mark Pizzolato
0daa80e03d SCP: Add support for library unit test routines 2018-08-26 18:15:30 -07:00
Richard Cornwell
8b1d058a63 SIM_CARD: New interface to support stacking cards and save/restore. 2018-08-05 22:43:07 -04:00
Mark Pizzolato
4894b84ebd PUNCH: Add new file switch information to punch help 2018-03-20 12:50:43 -07:00
Richard Cornwell
4ecb739cf6 SIM_CARD: Update to support IBM360 codes. 2017-12-02 21:05:13 -05:00
Richard Cornwell
057120e0b3 SIM_CARD: cleaned up handling of binary cards.
Handling of first character ~ to simulate End of File, now only
is treated as End of File if it appears on a line by itself.
2017-01-30 20:49:32 -05:00
Mark Pizzolato
03445f5f94 B5500: Promote sim_card to a top level simh library
Rich Cornwell's sim_card module is about to be used by another new simulator
so it is being promoted.
2016-05-15 18:01:38 -07:00
Renamed from B5500/sim_card.c (Browse further)