summaryrefslogtreecommitdiff
path: root/src/tools/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/util.h')
-rw-r--r--src/tools/util.h21
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