home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!sdd.hp.com!usc!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu!vidya-v
- From: vidya-v@acsu.buffalo.edu (vidyaranya)
- Newsgroups: comp.unix.aix
- Subject: Simple EOF problem?
- Message-ID: <BxvzEE.79B@acsu.buffalo.edu>
- Date: 18 Nov 92 00:44:37 GMT
- Sender: nntp@acsu.buffalo.edu
- Organization: UB
- Lines: 22
- Originator: vidya-v@beatrix.eng.buffalo.edu
- Nntp-Posting-Host: beatrix.eng.buffalo.edu
-
-
- The following piece of code FAILS to detect End of File
- under AIX(i dont know the version currently!) running on
- an IBM PowerServer 970.
- ------
- char buffer[2048];
- int i;
- FILE *fp;
-
- i=0;
- while( (buffer[i++]=fgetc(fp))!= EOF )
- ;
- ------
- Exactly same piece of code runs on a SparcStationIPC running
- SunOS 4.1.2 .
-
- What could be the problem?
-
- Thanks.
-
- Vidyaranya
- vidya-v@acsu.buffalo.edu
-