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:
@@ -1312,7 +1312,7 @@ if (uptr->WRITTEN && uptr->hwmark && ((uptr->flags & UNIT_RO)== 0)) { /* any
|
||||
} /* end loop buf */
|
||||
} /* end else */
|
||||
if (ferror (uptr->fileref))
|
||||
perror ("I/O error");
|
||||
sim_perror ("I/O error");
|
||||
}
|
||||
uptr->WRITTEN = FALSE; /* no longer dirty */
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ if ((uptr->flags & UNIT_ATT) == 0) {
|
||||
fputc (uptr->buf, uptr->fileref); /* print char */
|
||||
uptr->pos = ftell (uptr->fileref);
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("LPT I/O error");
|
||||
sim_perror ("LPT I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ if ((temp = getc (ptr_unit.fileref)) == EOF) {
|
||||
sim_printf ("PTR end of file\n");
|
||||
else return SCPE_OK;
|
||||
}
|
||||
else sim_printf ("PTR I/O error: %d\n", errno);
|
||||
else sim_perror ("PTR I/O error");
|
||||
clearerr (ptr_unit.fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ int_req = INT_UPDATE; /* update interrupts */
|
||||
if ((ptp_unit.flags & UNIT_ATT) == 0) /* attached? */
|
||||
return IORETURN (ptp_stopioe, SCPE_UNATT);
|
||||
if (putc (ptp_unit.buf, ptp_unit.fileref) == EOF) {
|
||||
perror ("PTP I/O error");
|
||||
sim_perror ("PTP I/O error");
|
||||
clearerr (ptp_unit.fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ rk_busy = 0;
|
||||
RK_INT_UPDATE;
|
||||
|
||||
if (err != 0) {
|
||||
perror ("RK I/O error");
|
||||
sim_perror ("RK I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ rlsa = rlsa + ((bc + (RL_NUMBY - 1)) / RL_NUMBY);
|
||||
rl_set_done (0);
|
||||
|
||||
if (err != 0) { /* error? */
|
||||
perror ("RL I/O error");
|
||||
sim_perror ("RL I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
@@ -893,7 +893,7 @@ if (uptr->WRITTEN && uptr->hwmark && ((uptr->flags & UNIT_RO)== 0)) { /* any
|
||||
} /* end loop buf */
|
||||
} /* end else */
|
||||
if (ferror (uptr->fileref))
|
||||
perror ("I/O error");
|
||||
sim_perror ("I/O error");
|
||||
}
|
||||
uptr->WRITTEN = FALSE; /* no longer dirty */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user