mirror of
https://github.com/simh/simh.git
synced 2026-02-23 15:43:15 +00:00
H316, NOVA, PDP11, PDP8, PDP18B, KX10: Record Sequential updates consistently
Devices that do single character I/O could be attached to non seekable host OS devices (tty, pipes, etc.) and thus shouldn't count on fseek() and ftell(). These DEVICEs on these simulators do single character I/O and easily can update their POS REGisters to reflect how much data has been emitted. Changing such a REGister will have no useful effect when attached to a non seekable file.
This commit is contained in:
@@ -163,12 +163,12 @@ if (lpt_csr & CSR_IE)
|
||||
if ((uptr->flags & UNIT_ATT) == 0)
|
||||
return IORETURN (lpt_stopioe, SCPE_UNATT);
|
||||
fputc (uptr->buf & 0177, uptr->fileref);
|
||||
uptr->pos = ftell (uptr->fileref);
|
||||
if (ferror (uptr->fileref)) {
|
||||
sim_perror ("LPT I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
uptr->pos = uptr->pos + 1;
|
||||
lpt_csr = lpt_csr & ~CSR_ERR;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user