1
0
mirror of https://github.com/simh/simh.git synced 2026-01-28 12:49:21 +00:00

All LP and CD devices: Removed use of ftell for pipe compatibility

This commit is contained in:
Bob Supnik
2022-05-16 04:57:30 -07:00
committed by Mark Pizzolato
parent 5d04198757
commit e2d3a2ae70
17 changed files with 152 additions and 105 deletions

View File

@@ -1,6 +1,6 @@
/* pdp8_lp.c: PDP-8 line printer simulator
Copyright (c) 1993-2016, Robert M Supnik
Copyright (c) 1993-2021, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -25,6 +25,7 @@
lpt LP8E line printer
20-Mar-21 RMS Reverted use of ftell for pipe compatibility
15-Dec-16 RMS Added LS8E decode (6660) for WPS8 (Dave Gesswein)
19-Jan-07 RMS Added UNIT_TEXT
25-Apr-03 RMS Revised for extended file support
@@ -147,12 +148,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? */
perror ("LPT I/O error");
clearerr (uptr->fileref);
return SCPE_IOERR;
}
uptr->pos = uptr->pos + 1;
return SCPE_OK;
}