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:
@@ -463,7 +463,7 @@ i = fxread (dpxb, sizeof (uint8), DP_NUMBY, uptr->fileref);
|
||||
for ( ; i < DP_NUMBY; i++) /* fill with 0's */
|
||||
dpxb[i] = 0;
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("DP I/O error");
|
||||
sim_perror ("DP I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
dp_done (STC_DTE);
|
||||
return SCPE_IOERR;
|
||||
@@ -479,7 +479,7 @@ for ( ; dp_bptr < DP_NUMBY; dp_bptr++)
|
||||
dpxb[dp_bptr] = dp_db; /* fill with last */
|
||||
fxwrite (dpxb, sizeof (uint8), DP_NUMBY, uptr->fileref);
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("DP I/O error");
|
||||
sim_perror ("DP I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
dp_done (STC_DTE);
|
||||
return SCPE_IOERR;
|
||||
|
||||
@@ -657,7 +657,7 @@ uint32 i;
|
||||
|
||||
i = fxread (idcxb, sizeof (uint8), IDC_NUMBY, uptr->fileref);
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("IDC I/O error");
|
||||
sim_perror ("IDC I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
idc_done (STC_DTE);
|
||||
return SCPE_IOERR;
|
||||
@@ -675,7 +675,7 @@ for ( ; idc_bptr < IDC_NUMBY; idc_bptr++)
|
||||
idcxb[idc_bptr] = idc_db; /* fill with last */
|
||||
fxwrite (idcxb, sizeof (uint8), IDC_NUMBY, uptr->fileref);
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("IDC I/O error");
|
||||
sim_perror ("IDC I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
idc_done (STC_DTE);
|
||||
return SCPE_IOERR;
|
||||
|
||||
@@ -185,7 +185,7 @@ if (lpt_spnd || ((t >= LF) && (t < CR))) { /* spc pend or spc op? *
|
||||
else fputs ("\r", uptr->fileref); /* overprint */
|
||||
uptr->pos = ftell (uptr->fileref); /* update position */
|
||||
if (ferror (lpt_unit.fileref)) {
|
||||
perror ("LPT I/O error");
|
||||
sim_perror ("LPT I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ if (lpxb[0]) { /* any char left? */
|
||||
fputs (lpxb, uptr->fileref); /* write line */
|
||||
lpt_unit.pos = ftell (uptr->fileref); /* update position */
|
||||
if (ferror (uptr->fileref)) {
|
||||
perror ("LPT I/O error");
|
||||
sim_perror ("LPT I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
r = SCPE_IOERR;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ if ((temp = getc (uptr->fileref)) == EOF) { /* error? */
|
||||
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 (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
@@ -228,7 +228,7 @@ if (!pt_rd) { /* write mode? */
|
||||
SET_INT (v_PT);
|
||||
}
|
||||
if (putc (uptr->buf, uptr -> fileref) == EOF) { /* write char */
|
||||
perror ("PTP I/O error");
|
||||
sim_perror ("PTP I/O error");
|
||||
clearerr (uptr -> fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user