Anonymous | Login | 2024-04-25 13:14 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 | ||
0000571 | [1003.1(2008)/Issue 7] System Interfaces | Objection | Clarification Requested | 2012-05-30 14:50 | 2019-06-10 08:55 | ||
Reporter | geoffclare | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Geoff Clare | ||||||
Organization | The Open Group | ||||||
User Reference | |||||||
Section | getdelim | ||||||
Page Number | 1005 | ||||||
Line Number | 33753 | ||||||
Interp Status | Approved | ||||||
Final Accepted Text | See Note: 0001246 | ||||||
Summary | 0000571: getdelim() end-of-file behaviour needs clarifying | ||||||
Description |
The RETURN VALUE section for getdelim() states: If no characters were read, and the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream shall be set and the function shall return -1. It is not clear from this what happens if the end-of-file indicator is already set, and the stream is not at end-of-file, before the call. The inclusion of the "no characters were read" condition could be taken as implying that when the end-of-file indicator is set getdelim() can attempt to read some characters and only needs to return -1 if it does not read any. However, XSH Section 2.5 states "All input takes place as if bytes were read by successive calls to fgetc()", and fgetc() is required to return EOF when the eof-of-file indicator is set regardless of whether the stream is at end-of-file. Therefore, in fact getdelim() is required not to try to read any characters and the "no characters were read" condition will always be true if the end-of-file indicator is already set. This is consistent with the "sticky end-of-file" behaviour of all the C99 stdio input functions. |
||||||
Desired Action |
Change: If no characters were read, and the end-of-file indicator for the stream is set, or if the stream is at end-of-file, the end-of-file indicator for the stream shall be set and the function shall return -1. to: If the end-of-file indicator for the stream is set, or if no characters were read and the stream is at end-of-file, the end-of-file indicator for the stream shall be set and the function shall return -1. |
||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2012-05-30 14:50 | geoffclare | New Issue | |
2012-05-30 14:50 | geoffclare | Status | New => Under Review |
2012-05-30 14:50 | geoffclare | Assigned To | => ajosey |
2012-05-30 14:50 | geoffclare | Name | => Geoff Clare |
2012-05-30 14:50 | geoffclare | Organization | => The Open Group |
2012-05-30 14:50 | geoffclare | Section | => getdelim |
2012-05-30 14:50 | geoffclare | Page Number | => 1005 |
2012-05-30 14:50 | geoffclare | Line Number | => 33753 |
2012-05-30 14:50 | geoffclare | Interp Status | => --- |
2012-05-31 15:44 | Don Cragun | Final Accepted Text | => See Note: 0001246 |
2012-05-31 15:44 | Don Cragun | Note Added: 0001246 | |
2012-05-31 15:44 | Don Cragun | Status | Under Review => Interpretation Required |
2012-05-31 15:44 | Don Cragun | Resolution | Open => Accepted |
2012-05-31 15:44 | Don Cragun | Tag Attached: tc2-2008 | |
2012-05-31 15:44 | Don Cragun | Resolution | Accepted => Accepted As Marked |
2012-05-31 15:51 | Don Cragun | Interp Status | --- => Pending |
2012-06-29 16:14 | ajosey | Interp Status | Pending => Proposed |
2012-06-29 16:14 | ajosey | Note Added: 0001285 | |
2012-08-30 09:12 | ajosey | Interp Status | Proposed => Approved |
2012-08-30 09:12 | ajosey | Note Added: 0001348 | |
2019-06-10 08:55 | agadmin | Status | Interpretation Required => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |