1
0
mirror of https://github.com/simh/simh.git synced 2026-01-25 11:46:37 +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

@@ -930,7 +930,7 @@ do {
}
if (err != 0) {
perror ("DKP I/O error");
sim_perror ("DKP I/O error");
clearerr (uptr->fileref);
rval = SCPE_IOERR;
break ;

View File

@@ -134,7 +134,7 @@ if ((lpt_unit.flags & UNIT_ATT) == 0) /* attached? */
fputc (uptr->buf, uptr->fileref);
uptr->pos = ftell (uptr->fileref);
if (ferror (uptr->fileref)) {
perror ("LPT I/O error");
sim_perror ("LPT I/O error");
clearerr (uptr->fileref);
return SCPE_IOERR;
}

View File

@@ -139,7 +139,7 @@ DEV_UPDATE_INTR ;
if ((plt_unit.flags & UNIT_ATT) == 0) /* attached? */
return IORETURN (plt_stopioe, SCPE_UNATT);
if (putc (plt_unit.buf, plt_unit.fileref) == EOF) {
perror ("PLT I/O error");
sim_perror ("PLT I/O error");
clearerr (plt_unit.fileref);
return SCPE_IOERR;
}

View File

@@ -197,7 +197,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");
else sim_perror ("PTR I/O error");
clearerr (ptr_unit.fileref);
return SCPE_IOERR;
}
@@ -277,7 +277,7 @@ DEV_UPDATE_INTR ;
if ((ptp_unit.flags & UNIT_ATT) == 0) /* attached? */
return IORETURN (ptp_stopioe, SCPE_UNATT);
if (putc ((ptp_unit.buf & ((ptp_unit.flags & UNIT_8B)? 0377: 0177)), ptp_unit.fileref) == EOF) {
perror ("PTP I/O error");
sim_perror ("PTP I/O error");
clearerr (ptp_unit.fileref);
return SCPE_IOERR;
}