1
0
mirror of https://github.com/simh/simh.git synced 2026-02-12 02:48:38 +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

@@ -227,7 +227,7 @@ switch (cdr_sta) { /* case on state */
if (feof (uptr->fileref)) /* eof? */
return ch6_err_disc (CH_A, U_CDR, CHF_EOF); /* set EOF, disc */
if (ferror (uptr->fileref)) { /* error? */
perror ("CDR I/O error");
sim_perror ("CDR I/O error");
clearerr (uptr->fileref);
return SCPE_IOERR; /* stop */
}
@@ -456,7 +456,7 @@ cdp_cbuf[i++] = 0; /* append nul */
fputs (cdp_cbuf, uptr->fileref); /* write card */
uptr->pos = ftell (uptr->fileref); /* update position */
if (ferror (uptr->fileref)) { /* error? */
perror ("CDP I/O error");
sim_perror ("CDP I/O error");
clearerr (uptr->fileref);
return SCPE_IOERR;
}

View File

@@ -888,7 +888,7 @@ da = DSK_DA (dsk_acc, trk, dtyp); /* get disk address */
sim_fseek (udptr->fileref, da, SEEK_SET); /* read track */
k = sim_fread (dsk_buf, sizeof (t_uint64), dsk_tab[dtyp].wdspt, udptr->fileref);
if (ferror (udptr->fileref)) { /* error? */
perror ("DSK I/O error");
sim_perror ("DSK I/O error");
clearerr (udptr->fileref);
dsk_uend (dsk_ch, DSKS_DSKE);
return SCPE_IOERR;
@@ -989,7 +989,7 @@ uint32 da = DSK_DA (dsk_acc, trk, dtyp);
sim_fseek (udptr->fileref, da, SEEK_SET);
sim_fwrite (dsk_buf, sizeof (t_uint64), dsk_tab[dtyp].wdspt, udptr->fileref);
if (ferror (udptr->fileref)) {
perror ("DSK I/O error");
sim_perror ("DSK I/O error");
clearerr (udptr->fileref);
dsk_uend (dsk_ch, DSKS_DSKE);
return SCPE_IOERR;

View File

@@ -340,7 +340,7 @@ if (uptr->flags & UNIT_ATT) { /* file? */
fputc ('\n', uptr->fileref); /* append nl */
uptr->pos = ftell (uptr->fileref); /* update position */
if (ferror (uptr->fileref)) { /* error? */
perror ("LPT I/O error");
sim_perror ("LPT I/O error");
clearerr (uptr->fileref);
return SCPE_IOERR;
}