home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / shareware / crystalppc / myfread.cpp < prev    next >
C/C++ Source or Header  |  1998-06-08  |  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.