summaryrefslogtreecommitdiff
path: root/include/tinyff
diff options
context:
space:
mode:
Diffstat (limited to 'include/tinyff')
-rw-r--r--include/tinyff/common.h17
-rw-r--r--include/tinyff/image/png.h5
2 files changed, 20 insertions, 2 deletions
diff --git a/include/tinyff/common.h b/include/tinyff/common.h
new file mode 100644
index 0000000..d53adae
--- /dev/null
+++ b/include/tinyff/common.h
@@ -0,0 +1,17 @@
+// Common header for tinyff library
+// Not recommended to be included directly
+#ifndef TINYFF_COMMON_H
+#define TINYFF_COMMON_H
+
+#include <stdint.h>
+
+// Human readable number types
+// NOTE: The only reason I created these was so
+// that debugging will be easier
+typedef uint8_t ff_byte;
+
+// Functions
+
+static inline uint32_t get_big_endian(const uint8_t *buffer);
+
+#endif \ No newline at end of file
diff --git a/include/tinyff/image/png.h b/include/tinyff/image/png.h
index 78b92e4..95ab94f 100644
--- a/include/tinyff/image/png.h
+++ b/include/tinyff/image/png.h
@@ -5,9 +5,10 @@
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
+#include <stdlib.h>
#include "tinyff/result.h"
-
+#include "tinyff/common.h"
static const unsigned char PNG_SIGNATURE[8] = {
@@ -50,6 +51,6 @@ typedef struct {
ff_result ff_png_isvalid(FILE *file);
ff_result ff_open_png(const char *filepath, ff_png_ctx **out_ctx);
-
+ff_result ff_next_chunk(FILE *file, ff_png_chunk **out_chunk);
#endif