mirror of
https://github.com/simh/simh.git
synced 2026-02-05 07:55:37 +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:
@@ -149,12 +149,12 @@ if ((uptr->flags & UNIT_ATT) == 0) {
|
||||
return IORETURN (lpt_stopioe, SCPE_UNATT);
|
||||
}
|
||||
fputc (uptr->buf, uptr->fileref); /* print char */
|
||||
uptr->pos = ftell (uptr->fileref);
|
||||
if (ferror (uptr->fileref)) { /* error? */
|
||||
sim_perror ("LPT I/O error");
|
||||
clearerr (uptr->fileref);
|
||||
return SCPE_IOERR;
|
||||
}
|
||||
uptr->pos = uptr->pos + 1;
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user