home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / lib / readfile.h < prev    next >
C/C++ Source or Header  |  1998-06-08  |  2KB  |  50 lines

  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: f:/miner/source/pslib/rcs/readfile.h $
  15.  * $Revision: 1.5 $
  16.  * $Author: matt $
  17.  * $Date: 1993/10/19 12:38:14 $
  18.  *
  19.  * 
  20.  *
  21.  */
  22.  
  23. #ifndef _READFILE_H
  24. #define _READFILE_H
  25.  
  26. #include "types.h"
  27.  
  28. #define ERROR_OPENING_FILE  21
  29. #define ERROR_WRITING_FILE  22
  30. #define ERROR_READING_DATA -20
  31.  
  32. void *ReadFile( char *filename, int *length );
  33. // ReadFile reads 'filename' and returns the buffer and passes the length
  34. // in bytes.
  35.  
  36. int WriteFile( char *filename, void *data, int length );
  37. // WriteFile writes 'length' bytes of 'data' to 'filename'
  38. //  returns an error code != 0 if there is an error.
  39.  
  40. int AppendFile( char *filename, void *data, int length );
  41. // AppendFile appends 'length' bytes of 'data' to 'filename'
  42. //  returns an error code != 0 if there is an error.
  43.  
  44. int ReadFileBuf( char *filename, byte *buf, int bufsize );
  45. // ReadFileBuf reads bufize bytes of 'filename' into the address of 'buf'
  46. //  returns an error code < 0 if there is an error.
  47.  
  48. #endif
  49.  
  50.