From 3e3c4d27fed3c259a6d95354a1b457144c357352 Mon Sep 17 00:00:00 2001
From: Abdelrahman <said.abdelrahman89@gmail.com>
Date: Sun, 5 May 2024 19:47:20 +0100
Subject: [PATCH] Reorder type definitions

---
 src/tiff/tiffread.h | 60 ++++++++++++++++++++++-----------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/tiff/tiffread.h b/src/tiff/tiffread.h
index 7a0c1c5..e31a238 100644
--- a/src/tiff/tiffread.h
+++ b/src/tiff/tiffread.h
@@ -12,36 +12,6 @@ extern "C" {
 
 #define TYPE_MAX_COUNT (UINT8_MAX * sizeof(const char *))
 
-typedef struct short_long_value ShortLongValue;
-struct short_long_value {
-  union {
-    u16 short_val;
-    u32 long_val;
-  };
-};
-
-typedef struct hdr TiffHdr;
-struct hdr {
-  u16 order;
-  u16 magic;
-  u32 first_ifd_offset;
-};
-
-typedef struct field TiffField;
-struct field {
-  u16 tag;
-  u16 type;
-  u32 count;
-  u32 value_offset;
-};
-
-typedef struct IFD TiffIFD;
-struct IFD {
-  u16 count;
-  TiffField *fields;
-  u32 next_ifd;
-};
-
 // clang-format off
 enum tiff_byte_order {
   TIFF_ORDER_LITTLE_ENDIAN = 0x4949,
@@ -111,6 +81,36 @@ enum tiff_planar_configuration {
 };
 // clang-format on
 
+typedef struct short_long_value ShortLongValue;
+struct short_long_value {
+  union {
+    u16 short_val;
+    u32 long_val;
+  };
+};
+
+typedef struct hdr TiffHdr;
+struct hdr {
+  u16 order;
+  u16 magic;
+  u32 first_ifd_offset;
+};
+
+typedef struct field TiffField;
+struct field {
+  u16 tag;
+  u16 type;
+  u32 count;
+  u32 value_offset;
+};
+
+typedef struct IFD TiffIFD;
+struct IFD {
+  u16 count;
+  TiffField *fields;
+  u32 next_ifd;
+};
+
 typedef struct tiff_strip TiffStrip;
 struct tiff_strip {
   u32 offset;