home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Jeux / demos / crystalPPC.lha / myfread.cpp < prev    next >
C/C++ Source or Header  |  1998-02-05  |  264b  |  13 lines

  1.  
  2. #include <clib/dos_protos.h>
  3.  
  4. long myfread(char *fname,char *ptr,long filesize)
  5. {
  6.    BPTR file=Open(fname,MODE_OLDFILE);
  7.    if(file==0) return 1;
  8.    LONG count=Read(file,ptr,filesize);
  9.    if(count!=filesize) {Close(file);return 1;}
  10.    Close(file);
  11.    return 0;
  12. }
  13.