From: Shawn O. Pearce Date: Mon, 05 Oct 2009 15:27:55 GMT Subject: Re: [PATCH 1/6] Open the pack file and keep a map on it. Message-ID: <20091005152755.GF9261@spearce.org> In-Reply-To: <1254593401-18801-2-git-send-email-herve@itaapy.com> Herv?? Cauwelier wrote: > diff --git a/src/odb.h b/src/odb.h > index 2f205b2..0311d78 100644 > --- a/src/odb.h > +++ b/src/odb.h > @@ -11,9 +11,10 @@ > * uint32_t *fanout = ... the file data at offset 0 ... > * ntohl(fanout[0]) < ntohl(fanout[1]) > * > - * The value chosen here for PACK_TOC is such that the above > + * The value chosen here for IDX_TOC is such that the above > * cannot be true for an idx v1 file. > */ > -#define PACK_TOC 0xff744f63 /* -1tOc */ > +#define IDX_TOC 0xff744f63 /* -1tOc */ > +#define PACK_TOC 0x5041434b /* PACK */ FWIW, I wouldn't call the magic string 'PACK' PACK_TOC. TOC here meant "table of contents". The magic string '-1tOc' for PACK_TOC is no accident, its trying to show that this file is a table of contents file. I think at the time I meant for PACK_TOC to be the pack-*.idx header magic string, and PACK_SIG or PACK_HDR to be the magic string for pack-*.pack. -- Shawn.