]> mj.ucw.cz Git - libucw.git/commitdiff
Corrected INDEX_VERSION, documented the rules and added CUSTOM_INDEX_VERSION.
authorMartin Mares <mj@ucw.cz>
Sun, 14 Nov 2004 11:45:15 +0000 (11:45 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 14 Nov 2004 11:45:15 +0000 (11:45 +0000)
lib/index.h

index 7e91ced4202cc5002979c26058b61d7aad7532fe..b1796c2ae0c692f6936590caaebb5272808d8d8a 100644 (file)
@@ -9,7 +9,17 @@
 
 #include "custom/lib/custom.h"
 
-#define INDEX_VERSION (0x34010000+sizeof(struct card_attr))    /* Increase with each incompatible change in index format */
+/*
+ *  Magic number which should help to avoid mixing incompatible indices.
+ *  Syntax: <magic-byte><version><revision><custom-dependent-part>
+ *  Remember to increase with each change of index format.
+ */
+
+#ifndef CUSTOM_INDEX_VERSION
+#define CUSTOM_INDEX_VERSION sizeof(struct card_attr)
+#endif
+
+#define INDEX_VERSION (0x32340100+CUSTOM_INDEX_VERSION)
 
 /*
  *  Words