mirror of
https://github.com/open-simh/simh.git
synced 2026-04-26 20:26:59 +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:
@@ -465,9 +465,7 @@ if ((cpu_boot_cmd[0] == 0) || /* saved boot cmd? */
|
||||
(reset_all (0) != SCPE_OK) || /* reset the world */
|
||||
(cpu_boot (0, NULL) != SCPE_OK)) /* set up boot code */
|
||||
ABORT (STOP_BOOT); /* any error? */
|
||||
printf ("Rebooting...\n");
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "Rebooting...\n");
|
||||
sim_printf ("Rebooting...\n");
|
||||
return cc;
|
||||
}
|
||||
|
||||
@@ -485,9 +483,7 @@ t_stat r;
|
||||
r = vax730_boot_parse (flag, ptr); /* parse the boot cmd */
|
||||
if (r != SCPE_OK) { /* error? */
|
||||
if (r >= SCPE_BASE) { /* message available? */
|
||||
printf ("%s\n", sim_error_text (r));
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "%s\n", sim_error_text (r));
|
||||
sim_printf ("%s\n", sim_error_text (r));
|
||||
r |= SCPE_NOMESSAGE;
|
||||
}
|
||||
return r;
|
||||
@@ -633,9 +629,7 @@ if ((nexusR[idx] && dibp->rd && /* conflict? */
|
||||
(nexusR[idx] != dibp->rd)) ||
|
||||
(nexusW[idx] && dibp->wr &&
|
||||
(nexusW[idx] != dibp->wr))) {
|
||||
printf ("Nexus %s conflict at %d\n", sim_dname (dptr), dibp->ba);
|
||||
if (sim_log)
|
||||
fprintf (sim_log, "Nexus %s conflict at %d\n", sim_dname (dptr), dibp->ba);
|
||||
sim_printf ("Nexus %s conflict at %d\n", sim_dname (dptr), dibp->ba);
|
||||
return SCPE_STOP;
|
||||
}
|
||||
if (dibp->rd) /* set rd dispatch */
|
||||
|
||||
Reference in New Issue
Block a user