mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps to identify unexpected coding errors. Most simulators can now also be compiled with a C++ compiler without warnings. Additionally, these changes have also been configured to facilitate easier backporting of simulator and device simulation modules to run under the simh v3.9+ SCP framework.
This commit is contained in:
18
sim_disk.h
18
sim_disk.h
@@ -30,6 +30,10 @@
|
||||
#ifndef SIM_DISK_H_
|
||||
#define SIM_DISK_H_ 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* SIMH/Disk format */
|
||||
|
||||
typedef uint32 t_seccnt; /* disk sector count */
|
||||
@@ -64,7 +68,7 @@ typedef void (*DISK_PCALLBACK)(UNIT *unit, t_stat status);
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
t_stat sim_disk_attach (UNIT *uptr, char *cptr, size_t sector_size, size_t xfer_element_size, t_bool dontautosize,
|
||||
t_stat sim_disk_attach (UNIT *uptr, const char *cptr, size_t sector_size, size_t xfer_element_size, t_bool dontautosize,
|
||||
uint32 debugbit, const char *drivetype, uint32 pdp11_tracksize, int completion_delay);
|
||||
t_stat sim_disk_detach (UNIT *uptr);
|
||||
t_stat sim_disk_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
|
||||
@@ -73,10 +77,10 @@ t_stat sim_disk_rdsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectsread
|
||||
t_stat sim_disk_wrsect (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects);
|
||||
t_stat sim_disk_wrsect_a (UNIT *uptr, t_lba lba, uint8 *buf, t_seccnt *sectswritten, t_seccnt sects, DISK_PCALLBACK callback);
|
||||
t_stat sim_disk_unload (UNIT *uptr);
|
||||
t_stat sim_disk_set_fmt (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat sim_disk_show_fmt (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat sim_disk_set_capac (UNIT *uptr, int32 val, char *cptr, void *desc);
|
||||
t_stat sim_disk_show_capac (FILE *st, UNIT *uptr, int32 val, void *desc);
|
||||
t_stat sim_disk_set_fmt (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat sim_disk_show_fmt (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat sim_disk_set_capac (UNIT *uptr, int32 val, CONST char *cptr, void *desc);
|
||||
t_stat sim_disk_show_capac (FILE *st, UNIT *uptr, int32 val, CONST void *desc);
|
||||
t_stat sim_disk_set_asynch (UNIT *uptr, int latency);
|
||||
t_stat sim_disk_clr_asynch (UNIT *uptr);
|
||||
t_stat sim_disk_reset (UNIT *uptr);
|
||||
@@ -90,4 +94,8 @@ t_bool sim_disk_vhd_support (void);
|
||||
t_bool sim_disk_raw_support (void);
|
||||
void sim_disk_data_trace (UNIT *uptr, const uint8 *data, size_t lba, size_t len, const char* txt, int detail, uint32 reason);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user