Anonymous | Login | 2024-05-08 03:34 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000452 | [2008-TC1] System Interfaces | Objection | Omission | 2011-05-23 16:53 | 2011-06-15 14:58 | ||
Reporter | eblake | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Duplicate | ||||
Status | Closed | Product Version | Draft 1 | ||||
Name | Eric Blake | ||||||
Organization | Red Hat | ||||||
User Reference | ebb.unget | ||||||
Section | XSH/TC1/D1/0083 | ||||||
Page Number | 60 | ||||||
Line Number | 2099 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0000452: fflush changes need counterpart unget[w]c changes | ||||||
Description |
The proposed changes to fflush: ... the file offset of the underlying open file description shall be set to the file position of the stream, and any characters pushed back onto the stream by ungetc() or ungetwc() that have not subsequently been read from the stream shall be discarded. have clear rationale presented in bug 87 (that is, for proper behavior of { app1; app2; } < seekable, if app1 reads one byte too many then uses ungetc() to push it back before exiting, then app2 must start at the offset unused by app1). However, that wording is in conflict with existing wording in ungetc: [XSH 67927] The value of the file-position indicator for the stream after reading or discarding all pushed-back bytes shall be the same as it was before the bytes were pushed back. For the change to be complete, we also need to modify the wording of ungetc and ungetwc to make it clear that discarded push-back characters reset the file offset to the same offset in use while the push-back characters were pending, and not the offset that was reached prior to the push-back operation. |
||||||
Desired Action |
At page 141 of draft 1, insert new change actions in the appropriate positions: On Page: 2151 Line: 67927 Section: ungetc() In the DESCRIPTION section, change from: The value of the file-position indicator for the stream after reading or discarding all pushed-back bytes shall be the same as it was before the bytes were pushed back. to: The value of the file-position indicator for the stream after reading all pushed-back bytes shall be the same as it was before the bytes were pushed back. Rationale: Pushed-back bytes discarded by fflush() are re-read from a seekable underlying file, rather than skipped. On Page: 2152 Line: 67971 Section: ungetwc() In the DESCRIPTION section, change from: The value of the file-position indicator for the stream after reading or discarding all pushed-back characters shall be the same as it was before the characters were pushed back. to: The value of the file-position indicator for the stream after reading all pushed-back characters shall be the same as it was before the characters were pushed back. Rationale: Pushed-back characters discarded by fflush() are re-read from a seekable underlying file, rather than skipped. |
||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
Relationships | |||||||||||||
|
Notes | |
(0000790) eblake (manager) 2011-05-23 19:45 |
Additionally: At line 4853 [XSH/TC1/D1/0331 ungetc], change: fseek(), [CX]fseeko()[/CX] fsetpos(), or rewind() to: [CX]fflush()[/CX], fseek(), [CX]fseeko()[/CX] fsetpos(), or rewind() At line 4864 [XSH/TC1/D1/0332 ungetwc], change: fseek(), [CX]fseeko()[/CX] fsetpos(), or rewind() to: [CX]fflush()[/CX], fseek(), [CX]fseeko()[/CX] fsetpos(), or rewind() |
(0000835) Don Cragun (manager) 2011-06-15 14:58 |
This bug affects the changes instituted for an approved interpretation 0000087 so this bug is closed as a duplicate of it and it is being reopened. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |