memset(header, '\0', sizeof(struct wrg_header));
strncpy(header->signature, signature, sizeof(header->signature));
memset(header, '\0', sizeof(struct wrg_header));
strncpy(header->signature, signature, sizeof(header->signature));
put_u32(&header->magic1, WRG_MAGIC);
put_u32(&header->magic2, WRG_MAGIC);
put_u32(&header->size, st.st_size);
put_u32(&header->magic1, WRG_MAGIC);
put_u32(&header->magic2, WRG_MAGIC);
put_u32(&header->size, st.st_size);