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:
@@ -245,7 +245,7 @@ if (uptr->flags & UNIT_ATT) { /* attached? */
|
||||
uptr->pos = ftell (uptr->fileref); /* update position */
|
||||
if (ferror (uptr->fileref)) { /* I/O error? */
|
||||
lpt_end_op (CHF_EOR | CHF_ERR); /* set err, disc */
|
||||
perror ("LPT I/O error"); /* print msg */
|
||||
sim_perror ("LPT I/O error"); /* print msg */
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR; /* ret error */
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ if ((temp = getc (ptr_unit.fileref)) == EOF) { /* end of file? */
|
||||
sim_printf ("PTR end of file\n");
|
||||
else return SCPE_OK;
|
||||
}
|
||||
else perror ("PTR I/O error"); /* I/O error */
|
||||
else sim_perror ("PTR I/O error"); /* I/O error */
|
||||
clearerr (ptr_unit.fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
@@ -414,7 +414,7 @@ if ((ptp_unit.flags & UNIT_ATT) == 0) { /* attached? */
|
||||
}
|
||||
if (putc (dat, ptp_unit.fileref) == EOF) { /* I/O error? */
|
||||
ptp_set_err (); /* yes, disc, err */
|
||||
perror ("PTP I/O error"); /* print msg */
|
||||
sim_perror ("PTP I/O error"); /* print msg */
|
||||
clearerr (ptp_unit.fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user