mirror of
https://github.com/simh/simh.git
synced 2026-01-26 12:02:14 +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:
@@ -1112,7 +1112,7 @@ if (uptr->hwmark && ((uptr->flags & UNIT_RO) == 0)) { /* any data? */
|
||||
else fxwrite (uptr->filebuf, sizeof (uint32), /* write file */
|
||||
uptr->hwmark, uptr->fileref);
|
||||
if (ferror (uptr->fileref))
|
||||
perror ("I/O error");
|
||||
sim_perror ("I/O error");
|
||||
} /* end if hwmark */
|
||||
free (uptr->filebuf); /* release buf */
|
||||
uptr->flags = uptr->flags & ~UNIT_BUF; /* clear buf flag */
|
||||
|
||||
@@ -169,7 +169,7 @@ if (lpt_spc) { /* space? */
|
||||
fputs (lpt_cc[lpt_spc & 07], uptr->fileref); /* print cctl */
|
||||
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;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ else {
|
||||
fputs (lpt_buf, uptr->fileref); /* print buffer */
|
||||
uptr->pos = ftell (uptr->fileref); /* update position */
|
||||
if (ferror (uptr->fileref)) { /* test error */
|
||||
perror ("LPT I/O error");
|
||||
sim_perror ("LPT I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ if (temp == 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 (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
@@ -510,7 +510,7 @@ dev_req_int (ptp_sbs); /* req interrupt */
|
||||
if ((uptr->flags & UNIT_ATT) == 0) /* not attached? */
|
||||
return IORETURN (ptp_stopioe, SCPE_UNATT);
|
||||
if (putc (uptr->buf, uptr->fileref) == EOF) { /* I/O error? */
|
||||
perror ("PTP I/O error");
|
||||
sim_perror ("PTP I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user