From 73aa9b71c1d8b5c5065d1e474f13601da3ca6b20 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 22 May 2007 15:03:32 +0000 Subject: started the major restructure of svn --- src/snapshot.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/snapshot.h (limited to 'src/snapshot.h') diff --git a/src/snapshot.h b/src/snapshot.h new file mode 100644 index 00000000..9d803486 --- /dev/null +++ b/src/snapshot.h @@ -0,0 +1,19 @@ + +struct snapshot +{ + int num_items; + int offsets[1]; + + struct item + { + int type_and_id; + char data[1]; + + int type() { return type_and_id>>16; } + int id() { return type_and_id&(0xffff); } + }; + + char *data_start() { return (char *)&offsets[num_items]; } + item *get_item(int index) { return (item *)(data_start() + offsets[index]); }; +}; + -- cgit 1.4.1