Anonymous | Login | 2023-06-10 18:40 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 | ||
0001374 | [1003.1(2016/18)/Issue7+TC2] System Interfaces | Objection | Error | 2020-07-15 09:30 | 2021-01-13 16:01 | ||
Reporter | geoffclare | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted | ||||
Status | Applied | ||||||
Name | Geoff Clare | ||||||
Organization | The Open Group | ||||||
User Reference | |||||||
Section | ungetwc() | ||||||
Page Number | 2195 | ||||||
Line Number | 70178 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0001374: Value of file-position indicator after ungetwc() | ||||||
Description |
The ungetwc() page says "The file-position indicator is decremented (by one or more) by each successful call to ungetwc(); if its value was 0 before a call, its value is unspecified after the call." (Bug 0000701 changes "indicator is decremented" to "indicator for the stream shall be decremented".) This implies that if the position is at 1 byte and ungetwc() pushes back a wide character that converts to 2 bytes, then the position is required to be set to -1. The current text derives from XPG4 and does not match C99 (and is not CX shaded). The C99 text is the same as the original (1995) MSE spec. It says "the value of its file position indicator after a successful call to the ungetwc function is unspecified until all pushed-back wide characters are read or discarded". It appears that when the MSE was incorporated into SUSv2 this discrepancy went unnoticed and the defective XPG4 text has been retained until now. |
||||||
Desired Action |
After applying bug 701, change:The file-position indicator for the stream shall be decremented (by one or more) by each successful call to ungetwc(); if its value was 0 before a call, its value is unspecified after the call. The value of the file-position indicator after all pushed-back characters have been read 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 a successful call to ungetwc() is unspecified until all pushed-back wide characters are read or discarded; its value after all pushed-back wide characters have been read shall be the same as it was before the wide characters were pushed back. |
||||||
Tags | tc3-2008 | ||||||
Attached Files | |||||||
|
![]() |
|||||||
|
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |