mirror of
https://github.com/simh/simh.git
synced 2026-01-25 11:46:37 +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:
@@ -1528,7 +1528,7 @@ if (uptr->WRITTEN && uptr->hwmark && ((uptr->flags & UNIT_RO)== 0)) { /* any
|
||||
fxwrite (uptr->filebuf, sizeof (uint32), /* write file */
|
||||
uptr->hwmark, uptr->fileref);
|
||||
if (ferror (uptr->fileref))
|
||||
perror ("I/O error");
|
||||
sim_perror ("I/O error");
|
||||
}
|
||||
uptr->WRITTEN = FALSE; /* no longer dirty */
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ if (lp62_spc) { /* space? */
|
||||
fputs (lp62_cc[lp62_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;
|
||||
}
|
||||
@@ -200,7 +200,7 @@ else {
|
||||
fputs (lp62_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;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ if ((lp647_iot & 020) == 0) { /* print? */
|
||||
fputs (pbuf, uptr->fileref); /* print buffer */
|
||||
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);
|
||||
lp647_bp = 0;
|
||||
return SCPE_IOERR;
|
||||
@@ -438,7 +438,7 @@ if (lp647_iot & 060) { /* space? */
|
||||
fputs (lp647_cc[lp647_iot & 07], uptr->fileref); /* write 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;
|
||||
}
|
||||
@@ -610,7 +610,7 @@ if ((c == 0) || (c == 0177)) /* skip NULL, DEL */
|
||||
fputc (c, uptr->fileref); /* print char */
|
||||
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;
|
||||
}
|
||||
@@ -824,7 +824,7 @@ for (more = 1; more != 0; ) { /* loop until ctrl */
|
||||
fputs (ctrl[c[i]], uptr->fileref); /* space */
|
||||
uptr->pos = ftell (uptr->fileref);
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
perror ("LPT I/O error");
|
||||
sim_perror ("LPT I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
lp15_bp = 0;
|
||||
lp15_updsta (STA_DON | STA_ALM);
|
||||
|
||||
@@ -432,7 +432,7 @@ rp_busy = 0; /* clear busy */
|
||||
rp_updsta (STA_DON, 0); /* set done */
|
||||
|
||||
if (err != 0) { /* error? */
|
||||
perror ("RP I/O error");
|
||||
sim_perror ("RP I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return IORETURN (rp_stopioe, SCPE_IOERR);
|
||||
}
|
||||
|
||||
@@ -576,7 +576,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");
|
||||
else sim_perror ("PTR I/O error");
|
||||
clearerr (ptr_unit.fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
@@ -918,7 +918,7 @@ if (ptp_unit.flags & UNIT_PASCII) { /* ASCII mode? */
|
||||
}
|
||||
if (putc (ptp_unit.buf, ptp_unit.fileref) == EOF) { /* I/O error? */
|
||||
ptp_err = 1; /* set error */
|
||||
perror ("PTP I/O error");
|
||||
sim_perror ("PTP I/O error");
|
||||
clearerr (ptp_unit.fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user