mirror of
https://github.com/simh/simh.git
synced 2026-01-26 04:01:38 +00:00
More General cleanup migrate to using sim_printf vs separate calls to printf and fprintf(sim_log).
This commit is contained in:
@@ -164,10 +164,10 @@ if ((ptr_unit.flags & UNIT_ATT) == 0) /* attached? */
|
||||
if ((temp = getc (ptr_unit.fileref)) == EOF) {
|
||||
if (feof (ptr_unit.fileref)) {
|
||||
if (ptr_stopioe)
|
||||
printf ("PTR end of file\n");
|
||||
sim_printf ("PTR end of file\n");
|
||||
else return SCPE_OK;
|
||||
}
|
||||
else perror ("PTR I/O error");
|
||||
else sim_printf ("PTR I/O error: %d\n", errno);
|
||||
clearerr (ptr_unit.fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
@@ -799,13 +799,13 @@ if (uptr->filebuf == NULL) { /* can't alloc? */
|
||||
return SCPE_MEM;
|
||||
}
|
||||
fbuf = (uint16 *) uptr->filebuf; /* file buffer */
|
||||
printf ("%s%d: ", sim_dname (&td_dev), u);
|
||||
sim_printf ("%s%d: ", sim_dname (&td_dev), u);
|
||||
if (uptr->flags & UNIT_8FMT)
|
||||
printf ("12b format");
|
||||
sim_printf ("12b format");
|
||||
else if (uptr->flags & UNIT_11FMT)
|
||||
printf ("16b format");
|
||||
else printf ("18b/36b format");
|
||||
printf (", buffering file in memory\n");
|
||||
sim_printf ("16b format");
|
||||
else sim_printf ("18b/36b format");
|
||||
sim_printf (", buffering file in memory\n");
|
||||
uptr->io_flush = td_flush;
|
||||
if (uptr->flags & UNIT_8FMT) /* 12b? */
|
||||
uptr->hwmark = fxread (uptr->filebuf, sizeof (uint16),
|
||||
@@ -905,7 +905,7 @@ int u = (int)(uptr - td_dev.units);
|
||||
if (!(uptr->flags & UNIT_ATT))
|
||||
return SCPE_OK;
|
||||
if (uptr->hwmark && ((uptr->flags & UNIT_RO)== 0)) { /* any data? */
|
||||
printf ("%s%d: writing buffer to file\n", sim_dname (&td_dev), u);
|
||||
sim_printf ("%s%d: writing buffer to file\n", sim_dname (&td_dev), u);
|
||||
td_flush (uptr);
|
||||
} /* end if hwmark */
|
||||
free (uptr->filebuf); /* release buf */
|
||||
|
||||
Reference in New Issue
Block a user