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:
@@ -1081,7 +1081,7 @@ t_stat dp_ioerr (UNIT *uptr)
|
||||
uint32 cidx = uptr->UCTX;
|
||||
uint32 dva = dp_dib[cidx].dva;
|
||||
|
||||
perror ("DP I/O error");
|
||||
sim_perror ("DP I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
dp_ctx[cidx].dp_flags |= DPF_DPE; /* set DPE flag */
|
||||
chan_set_chf (dva, CHF_XMDE);
|
||||
|
||||
@@ -353,7 +353,7 @@ if (skp && CHP (CH_TOF, lp_cct[lp_cctp])) /* skip, TOF? */
|
||||
}
|
||||
uptr->pos = ftell (uptr->fileref); /* update position */
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("Line printer I/O error");
|
||||
sim_perror ("Line printer I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
chan_set_chf (lp_dib.dva, CHF_XMDE);
|
||||
return SCPE_IOERR;
|
||||
@@ -388,7 +388,7 @@ if ((lp_model == LP_7440) || lp_pass) { /* ready to print? */
|
||||
fputc (lp_inh? '\r': '\n', uptr->fileref); /* cr or nl */
|
||||
uptr->pos = ftell (uptr->fileref); /* update position */
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("Line printer I/O error");
|
||||
sim_perror ("Line printer I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
chan_set_chf (lp_dib.dva, CHF_XMDE);
|
||||
return SCPE_IOERR;
|
||||
|
||||
@@ -186,7 +186,7 @@ switch (pt_cmd) { /* case on state */
|
||||
break;
|
||||
}
|
||||
else { /* real error */
|
||||
perror ("PTR I/O error");
|
||||
sim_perror ("PTR I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
chan_set_chf (pt_dib.dva, CHF_XMDE); /* data error */
|
||||
return pt_chan_err (SCPE_IOERR); /* force uend */
|
||||
@@ -212,7 +212,7 @@ switch (pt_cmd) { /* case on state */
|
||||
if (CHS_IFERR (st)) /* channel error? */
|
||||
return pt_chan_err (st);
|
||||
if (putc (c, pt_unit[PTP].fileref) == EOF) {
|
||||
perror ("PTP I/O error");
|
||||
sim_perror ("PTP I/O error");
|
||||
clearerr (pt_unit[PTP].fileref);
|
||||
chan_set_chf (pt_dib.dva, CHF_XMDE); /* data error */
|
||||
return pt_chan_err (SCPE_IOERR); /* force uend */
|
||||
|
||||
Reference in New Issue
Block a user