home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / editor / dcflib.h < prev    next >
Text File  |  1998-06-08  |  2KB  |  68 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/main/editor/rcs/dcflib.h $
  15.  * $Revision: 2.0 $
  16.  * $Author: john $
  17.  * $Date: 1995/02/27 11:34:25 $
  18.  * 
  19.  * temporary demo version for mine.c
  20.  * 
  21.  * $Log: dcflib.h $
  22.  * Revision 2.0  1995/02/27  11:34:25  john
  23.  * Version 2.0! No anonymous unions, Watcom 10.0, with no need
  24.  * for bitmaps.tbl.
  25.  * 
  26.  * Revision 1.3  1994/02/14  20:14:27  john
  27.  * First version working with new cfile stuff.
  28.  * 
  29.  * Revision 1.2  1994/02/08  13:38:21  yuan
  30.  * mine loading functions converted.
  31.  * 
  32.  * Revision 1.1  1994/02/08  13:23:14  yuan
  33.  * Initial revision
  34.  * 
  35.  * 
  36.  */
  37.  
  38.  
  39.  
  40. #ifndef _DCFLIB_H
  41. #define _DCFLIB_H
  42.  
  43. #include "stdio.h"
  44. #include "types.h"
  45.  
  46. #define DCFILE FILE
  47.  
  48. // Opens a file for reading only. Returns NULL if error.
  49. #define dcfopen(filename) fopen((filename),"rb")
  50.  
  51. // Moves to a position in the file. Returns 0 if ok.
  52. #define dcfseek( cfile, position ) fseek( cfile, position, SEEK_SET); 
  53.  
  54. #define dcftell( cfile ) ftell(cfile)
  55. // Returns the current file position.
  56.  
  57. #define dcflength( cfile ) filelength(fileno(cfile))
  58. // Returns the length of the file.
  59.  
  60. #define dcfread( cfile, data, size ) fread(data, sizeof(byte), size, cfile)
  61. // Reads 'size' bytes of the file into 'data'. Returns 0 if ok.
  62.  
  63. #define dcfclose( cfile ) fclose( cfile )
  64. // Closes 'cfile'. Frees all memory associated with file.
  65.  
  66. #endif
  67. 
  68.