about summary refs log tree commit diff
path: root/src/snapshot.h
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-05-22 15:03:32 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-05-22 15:03:32 +0000
commit73aa9b71c1d8b5c5065d1e474f13601da3ca6b20 (patch)
tree88b6a0a4a2ebdd33a88f4a25682581d329d33f6b /src/snapshot.h
downloadzcatch-73aa9b71c1d8b5c5065d1e474f13601da3ca6b20.tar.gz
zcatch-73aa9b71c1d8b5c5065d1e474f13601da3ca6b20.zip
started the major restructure of svn
Diffstat (limited to 'src/snapshot.h')
-rw-r--r--src/snapshot.h19
1 files changed, 19 insertions, 0 deletions
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]); };
+};
+