Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef __BARRY_COD_INTERNAL_H__
00029 #define __BARRY_COD_INTERNAL_H__
00030
00031 #include "dll.h"
00032 #include <stdint.h>
00033 #include <sys/types.h>
00034 #include "platform.h"
00035
00036
00037 #if USE_PACK_PRAGMA
00038 #pragma pack(push, 1)
00039 #endif
00040
00041 #define CODFILE_TYPE_SIMPLE {0xDE, 0xC0}
00042 #define CODFILE_TYPE_PKZIP {0x50, 0x4B}
00043 #define PKZIP_LOCAL_FILE_SIG {0x50, 0x4B, 0x03, 0x04}
00044 #define PKZIP_DIRECTORY_SIG {0x50, 0x4B, 0x01, 0x02}
00045 #define PKZIP_END_DIRECTORY_SIG {0x50, 0x4B, 0x05, 0x06}
00046
00047
00048 typedef struct BXLOCAL {
00049 uint16_t hour:5;
00050 uint16_t minute:6;
00051 uint16_t second:5;
00052 } ATTRIBUTE_PACKED msdos_time_t;
00053
00054
00055 typedef struct BXLOCAL {
00056 uint16_t year:7;
00057 uint16_t month:4;
00058 uint16_t day:5;
00059 } ATTRIBUTE_PACKED msdos_date_t;
00060
00061
00062 typedef struct BXLOCAL {
00063
00064 uint16_t version_needed;
00065 uint16_t general_flag;
00066 uint16_t compression_method;
00067 msdos_time_t last_mod_time;
00068 msdos_date_t last_mod_date;
00069 uint32_t crc_32;
00070 uint32_t compressed_size;
00071 uint32_t uncompressed_size;
00072 uint16_t file_name_length;
00073 uint16_t extra_field_length;
00074
00075
00076 } ATTRIBUTE_PACKED pkzip_local_header_t;
00077
00078
00079 typedef struct BXLOCAL {
00080
00081 uint16_t version_madeby;
00082 uint16_t version_needed;
00083 uint16_t general_flag;
00084 uint16_t compression_method;
00085 msdos_time_t last_mod_time;
00086 msdos_date_t last_mod_date;
00087 uint32_t crc_32;
00088 uint32_t compressed_size;
00089 uint32_t uncompressed_size;
00090 uint16_t file_name_length;
00091 uint16_t extra_field_length;
00092 uint16_t file_comment_length;
00093 uint16_t disk_number;
00094 uint16_t internal_file_attr;
00095 uint32_t external_file_attr;
00096 uint32_t relative_offset;
00097
00098
00099
00100
00101 } ATTRIBUTE_PACKED pkzip_directory_t;
00102
00103
00104 typedef struct BXLOCAL {
00105
00106 uint16_t this_disk_number;
00107 uint16_t disk_with_first;
00108
00109 uint16_t this_disk_entry_count;
00110 uint16_t total_entry_count;
00111
00112 uint32_t directory_length;
00113 uint32_t directory_offset;
00114
00115 uint16_t file_comment_length;
00116
00117 } ATTRIBUTE_PACKED pkzip_end_directory_t;
00118
00119
00120 typedef struct BXLOCAL {
00121 uint16_t type;
00122 uint8_t unknown1[8];
00123 uint8_t unknown2[4];
00124 uint8_t unknown3[4];
00125 uint32_t size1;
00126 uint32_t size2;
00127 uint8_t strsize;
00128 uint8_t reserved2;
00129 uint8_t strfree;
00130 uint8_t reserved3;
00131 } ATTRIBUTE_PACKED codfile_header_t;
00132
00133
00134 typedef struct BXLOCAL {
00135 uint32_t flashid;
00136 uint32_t section_number;
00137 uint32_t vtable_pointer;
00138 time_t timestamp;
00139 uint32_t user_version;
00140 uint32_t fieldref_pointer;
00141 uint16_t maxtype_list_size;
00142 uint16_t reserved;
00143 int32_t data_section;
00144 int32_t module_info;
00145 uint16_t version;
00146 uint16_t code_size;
00147 uint16_t data_size;
00148 uint16_t flags;
00149 } ATTRIBUTE_PACKED code_header_t;
00150
00151
00152 typedef struct BXLOCAL {
00153 uint8_t flags;
00154 uint8_t version;
00155 uint16_t num_icalls;
00156 uint8_t num_modules;
00157 uint8_t num_classes ;
00158 uint16_t exported_string_offset;
00159 uint16_t data_uint8_ts_offset;
00160 uint16_t empty_field;
00161 uint16_t class_definitions;
00162 uint16_t array_of_unknow1_fields[14];
00163 uint16_t aliases;
00164 uint16_t array_of_unknow2_fields[22];
00165 } ATTRIBUTE_PACKED data_header_t;
00166
00167 #if USE_PACK_PRAGMA
00168 #pragma pack(pop)
00169 #endif
00170
00171 #endif
00172