Changed fast-import's pack header creation to use pack.h

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
maint
Shawn O. Pearce 2006-08-16 01:57:57 -04:00
parent c44cdc7eef
commit c90be46abd
1 changed files with 7 additions and 8 deletions

View File

@ -800,15 +800,14 @@ del_entry:


static void init_pack_header() static void init_pack_header()
{ {
const char* magic = "PACK"; struct pack_header hdr;
unsigned long version = 3;
unsigned long zero = 0;


version = htonl(version); hdr.hdr_signature = htonl(PACK_SIGNATURE);
ywrite(pack_fd, (char*)magic, 4); hdr.hdr_version = htonl(2);
ywrite(pack_fd, &version, 4); hdr.hdr_entries = 0;
ywrite(pack_fd, &zero, 4);
pack_offset = 4 * 3; ywrite(pack_fd, &hdr, sizeof(hdr));
pack_offset = sizeof(hdr);
} }


static void fixup_header_footer() static void fixup_header_footer()