home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / aix / 11667 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  868 b 

  1. 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
  2. From: vidya-v@acsu.buffalo.edu (vidyaranya)
  3. Newsgroups: comp.unix.aix
  4. Subject: Simple EOF problem?
  5. Message-ID: <BxvzEE.79B@acsu.buffalo.edu>
  6. Date: 18 Nov 92 00:44:37 GMT
  7. Sender: nntp@acsu.buffalo.edu
  8. Organization: UB
  9. Lines: 22
  10. Originator: vidya-v@beatrix.eng.buffalo.edu
  11. Nntp-Posting-Host: beatrix.eng.buffalo.edu
  12.  
  13.  
  14. The following piece of code FAILS to detect End of File
  15. under AIX(i dont know the version currently!) running on
  16. an IBM PowerServer 970.
  17. ------
  18.     char    buffer[2048];
  19.     int    i;
  20.     FILE    *fp;
  21.  
  22.     i=0;
  23.         while( (buffer[i++]=fgetc(fp))!= EOF )
  24.          ;
  25. ------
  26. Exactly same piece of code runs on a SparcStationIPC running
  27. SunOS 4.1.2 .
  28.  
  29. What could be the problem?
  30.  
  31. Thanks.
  32.  
  33. Vidyaranya
  34. vidya-v@acsu.buffalo.edu
  35.