]> git.draconx.ca Git - liblbx.git/blob - src/misc.h
Split off _lbx_fseek() into a shared component of the library.
[liblbx.git] / src / misc.h
1 #ifndef LBX_MISC_H_
2 #define LBX_MISC_H_
3
4 #include <stdio.h>
5
6 #define MIN(a,b) (((a)<(b))?(a):(b))
7 #define MAX(a,b) (((a)>(b))?(a):(b))
8
9 /** _lbx_fseek()
10  * Seeks the specified file to the specified offset, given that the file is
11  * currently positioned at *current.  If the file does not support seeking,
12  * and offset > *current, perform the seek by reading (and discarding) data.
13  */
14 int _lbx_fseek(FILE *f, long *current, size_t offset);
15
16 #endif