diff options
| author | Steven Fuller <relnev@icculus.org> | 2001-07-30 05:22:12 +0000 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:36 +0200 |
| commit | eb5c2cc01dbd5756790860ad5eb2302f911d9dc7 (patch) | |
| tree | 2928560dd46bce280d95e549069a7130dcccd1c1 /src/tools/util.h | |
| parent | f097dd925866f7a25c9fa58dcf46b4fc59302cb6 (diff) | |
Tools for testing.
Diffstat (limited to 'src/tools/util.h')
| -rw-r--r-- | src/tools/util.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tools/util.h b/src/tools/util.h new file mode 100644 index 0000000..d11a43f --- /dev/null +++ b/src/tools/util.h @@ -0,0 +1,21 @@ +#ifndef __UTIL_H__ +#define __UTIL_H__ + +#include <stdint.h> + +/* TODO: need unsigned version, way to signify success/EOF */ +/* ReadBytes */ + +int32_t ReadInt32M(FILE *fp); +int32_t ReadInt24M(FILE *fp); +int16_t ReadInt16M(FILE *fp); +int32_t ReadInt32L(FILE *fp); +int32_t ReadInt24L(FILE *fp); +int16_t ReadInt16L(FILE *fp); + +int8_t ReadInt8(FILE *fp); + +int filelength(int filedes); +int fsize(char *file_name); + +#endif |
