X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/0806586ee10e29b60a77c351d355a00087f81f57..8456fd3535202bc2b79df4ddb794cbfd075054fd:/src/misc.h diff --git a/src/misc.h b/src/misc.h new file mode 100644 index 0000000..d7a7605 --- /dev/null +++ b/src/misc.h @@ -0,0 +1,16 @@ +#ifndef LBX_MISC_H_ +#define LBX_MISC_H_ + +#include + +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + +/** _lbx_fseek() + * Seeks the specified file to the specified offset, given that the file is + * currently positioned at *current. If the file does not support seeking, + * and offset > *current, perform the seek by reading (and discarding) data. + */ +int _lbx_fseek(FILE *f, long *current, size_t offset); + +#endif