I'm trying to write out several structures to a typed file on disk.
I'm using:
blockwrite(thefile, struct_1, sizeof(struct_1));
blockwrite(thefile, struct_2, sizeof(struct_2));
blockwrite(thefile, struct_2, sizeof(struct_3));
.. and so on. Only about 3 of them anyway.
The problems are:
1. Struct_2 has three null-terminated fields. These contain people's names. These names are NOWHERE to be found when viewing the file with Xtree (in hex view mode).
2. The total size of the structures is about 300 bytes. The file, when closed, goes well over 30k in size! I've seen this before, and I never worked out what I actually did to fix it.