Austin Group Defect Tracker

Aardvark Mark IV


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
related to 0000087Closedajosey 1003.1(2008)/Issue 7 fflush and ungetc 
related to 0000093Closedajosey 1003.1(2008)/Issue 7 ungetc fseeko 

-  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.

- Issue History
Date Modified Username Field Change
2011-05-23 16:53 eblake New Issue
2011-05-23 16:53 eblake Status New => Under Review
2011-05-23 16:53 eblake Assigned To => ajosey
2011-05-23 16:53 eblake Name => Eric Blake
2011-05-23 16:53 eblake Organization => Red Hat
2011-05-23 16:53 eblake User Reference => ebb.unget
2011-05-23 16:53 eblake Section => XSH/TC1/D1/0083
2011-05-23 16:53 eblake Page Number => 60
2011-05-23 16:53 eblake Line Number => 2099
2011-05-23 16:53 eblake Interp Status => ---
2011-05-23 16:57 eblake Relationship added related to 0000087
2011-05-23 19:45 eblake Note Added: 0000790
2011-05-23 19:45 eblake Relationship added related to 0000093
2011-06-15 14:58 Don Cragun Note Added: 0000835
2011-06-15 14:58 Don Cragun Status Under Review => Closed
2011-06-15 14:58 Don Cragun Resolution Open => Duplicate


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker