I've made a new filter for the Micrographx Designer format. The extension is DRW (which is already used by another software)
I've identified the fingerprint of this format. It seems to be very simple. On 3 differents files, the hexadecimal dumps give in the header:
Code: Select all
0000000 ff01 0402 0203 0200 0202 0521 0400 ff01
0000010 ff03 0200 000a 0800 xxxx xxxx (those parts are different)
First I've added this in a new file_drw2.c (based on the template):
Code: Select all
static const unsigned char DRW2_header[24]= {
0xff, 0x01, 0x04, 0x02, 0x02, 0x03, 0x02, 0x00, 0x02, 0x02, 0x05, 0x21, 0x04, 0x00, 0xff, 0x01, 0xff, 0x03, 0x02, 0x00, 0x00, 0x0a, 0x08, 0x00
This part is now correct:
Code: Select all
static void register_header_check_drw(file_stat_t *file_stat)
{
static const unsigned char drw_header[8]= {
0x01, 0xff, 0x02, 0x04, 0x03, 0x02, 0x00, 0x02
};
Now my question is, for proposing a pull request in github for an official inclusion, what is the best for the file naming? Label it file_drw2.c for example?