1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 19:56:25 +00:00

All: Convert from C runtime library perror() to sim_perror so that all messages will arrive in the same place(s).

This commit is contained in:
Mark Pizzolato
2015-04-03 19:56:37 -07:00
parent f2ca388f9c
commit 41978eca80
57 changed files with 94 additions and 88 deletions

View File

@@ -245,7 +245,7 @@ if (uptr->flags & UNIT_ATT) { /* attached? */
uptr->pos = ftell (uptr->fileref); /* update position */
if (ferror (uptr->fileref)) { /* I/O error? */
lpt_end_op (CHF_EOR | CHF_ERR); /* set err, disc */
perror ("LPT I/O error"); /* print msg */
sim_perror ("LPT I/O error"); /* print msg */
clearerr (uptr->fileref);
return SCPE_IOERR; /* ret error */
}

View File

@@ -280,7 +280,7 @@ if ((temp = getc (ptr_unit.fileref)) == EOF) { /* end of file? */
sim_printf ("PTR end of file\n");
else return SCPE_OK;
}
else perror ("PTR I/O error"); /* I/O error */
else sim_perror ("PTR I/O error"); /* I/O error */
clearerr (ptr_unit.fileref);
return SCPE_IOERR;
}
@@ -414,7 +414,7 @@ if ((ptp_unit.flags & UNIT_ATT) == 0) { /* attached? */
}
if (putc (dat, ptp_unit.fileref) == EOF) { /* I/O error? */
ptp_set_err (); /* yes, disc, err */
perror ("PTP I/O error"); /* print msg */
sim_perror ("PTP I/O error"); /* print msg */
clearerr (ptp_unit.fileref);
return SCPE_IOERR;
}