Number | 354
|
Category | enhancement
|
Synopsis | 17.2.8: There is no $feof function
|
State | lrmdraft
|
Class | enhancement
|
Arrival-Date | May 29 2003
|
Originator | sharp@cadence.com
|
Release | 2001c: 17.2.8
|
Environment |
|
Description |
I was surprised to find that there is no $feof system function to test for end-of-file on a file descriptor. This is in a similar category to the existing $ferror. In C, I suspect that feof() is used more often than ferror(). However, it could be argued that there is a workaround by calling $fgetc and then calling $ungetc to put the character back if it wasn't EOF. |
Fix |
PROPOSAL revised and passed by BTF: ADD to list of File I/O tasks in introduction of section 17: $feof ADD new section: 17.2.8 Detecting end of file integer code; code = $feof ( fd ); Returns a non-zero value when EOF has previously been detected reading the input file fd. Returns zero otherwise. ADD correct bolding to this new section. CHANGE following section numbers to accomodate the new section. |
Audit-Trail |
Fix replaced by sharp@cadence.com on Sun Oct 31 02:04:20 2004 (I added this for Steven. Shalom) ADD new section: 17.2.8 Detecting end of file code = $feof ( fd ) Returns a non-zero value when EOF has previously been detected reading the input file fd. Returns zero otherwise. CHANGE following section numbers to accomodate the new section. From: Steven Sharp <sharp@cadence.com> To: etf-bugs@boyd.com, sharp@cadence.com Cc: Subject: Re: enhancement/354: PROPOSAL revised and passed by BTF Date: Mon, 1 Nov 2004 17:29:56 -0500 (EST) ADD to list of File I/O tasks in introduction of section 17: $feof ADD new section: 17.2.8 Detecting end of file integer code; code = $feof ( fd ); Returns a non-zero value when EOF has previously been detected reading the input file fd. Returns zero otherwise. ADD correct bolding to this new section. CHANGE following section numbers to accomodate the new section. Steven Sharp sharp@cadence.com Fix replaced by Shalom.Bresticker@freescale.com on Thu Nov 4 05:47:31 2004 PROPOSAL revised and passed by BTF: ADD to list of File I/O tasks in introduction of section 17: $feof ADD new section: 17.2.8 Detecting end of file integer code; code = $feof ( fd ); Returns a non-zero value when EOF has previously been detected reading the input file fd. Returns zero otherwise. ADD correct bolding to this new section. CHANGE following section numbers to accomodate the new section. |
Unformatted |
|
Hosted by Boyd Technology