Reorder type definitions
This commit is contained in:
		| @@ -12,36 +12,6 @@ extern "C" { | |||||||
|  |  | ||||||
| #define TYPE_MAX_COUNT (UINT8_MAX * sizeof(const char *)) | #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 | // clang-format off | ||||||
| enum tiff_byte_order { | enum tiff_byte_order { | ||||||
|   TIFF_ORDER_LITTLE_ENDIAN = 0x4949, |   TIFF_ORDER_LITTLE_ENDIAN = 0x4949, | ||||||
| @@ -111,6 +81,36 @@ enum tiff_planar_configuration { | |||||||
| }; | }; | ||||||
| // clang-format on | // 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; | typedef struct tiff_strip TiffStrip; | ||||||
| struct tiff_strip { | struct tiff_strip { | ||||||
|   u32 offset; |   u32 offset; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user