]> icculus.org git repositories - btb/d2x.git/blob - include/fileutil.h
oops
[btb/d2x.git] / include / fileutil.h
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-1999 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13
14 #ifndef _FILEUTIL_
15 #define _FILEUTIL_
16
17 #include <stdio.h>
18
19 #include "pstypes.h"
20 #include "fix.h"
21
22 extern int filelength(int fd);
23
24 // routines which read basic data types
25 extern byte file_read_byte(FILE *fp);
26 extern short file_read_short(FILE *fp);
27 extern int file_read_int(FILE *fp);
28 extern fix file_read_fix(FILE *fp);
29
30 // routines which write basic data types
31 extern int file_write_byte(FILE *fp, byte b);
32 extern int file_write_short(FILE *fp, short s);
33 extern int file_write_int(FILE *fp, int i);
34 extern int file_write_fix(FILE *fp, fix f);
35
36 #endif