mirror of
https://github.com/simh/simh.git
synced 2026-02-19 22:06:34 +00:00
SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful. Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
This commit is contained in:
@@ -196,12 +196,14 @@ int32 sections_read = 0;
|
||||
for (;;) {
|
||||
csum = origin = field = newf = 0; /* init */
|
||||
do { /* skip leader */
|
||||
if ((hi = sim_bin_getc (fi, &newf)) == EOF)
|
||||
if ((hi = sim_bin_getc (fi, &newf)) == EOF) {
|
||||
if (sections_read != 0) {
|
||||
printf ("%d sections sucessfully read\n\r", sections_read);
|
||||
sim_printf ("%d sections sucessfully read\n\r", sections_read);
|
||||
return SCPE_OK;
|
||||
} else
|
||||
}
|
||||
else
|
||||
return SCPE_FMT;
|
||||
}
|
||||
} while ((hi == 0) || (hi >= 0200));
|
||||
for (;;) { /* data blocks */
|
||||
if ((lo = sim_bin_getc (fi, &newf)) == EOF) /* low char */
|
||||
@@ -213,7 +215,7 @@ for (;;) {
|
||||
if (hi == 0200) { /* end of tape? */
|
||||
if ((csum - wd) & 07777) { /* valid csum? */
|
||||
if (sections_read != 0)
|
||||
printf ("%d sections sucessfully read\n\r", sections_read);
|
||||
sim_printf ("%d sections sucessfully read\n\r", sections_read);
|
||||
return SCPE_CSUM;
|
||||
}
|
||||
if (!(sim_switches & SWMASK ('A'))) /* Load all sections? */
|
||||
|
||||
Reference in New Issue
Block a user