Index: trunk/include/regfi.h
===================================================================
--- trunk/include/regfi.h	(revision 152)
+++ trunk/include/regfi.h	(revision 157)
@@ -105,4 +105,5 @@
 #define REGFI_SK_MIN_LENGTH        0x14
 #define REGFI_SUBKEY_LIST_MIN_LEN  0x4
+#define REGFI_BIG_DATA_MIN_LENGTH  0xC
 
 
@@ -444,4 +445,6 @@
 
 
+
+
 /******************************************************************************/
 /*                         Main iterator API                                  */
@@ -468,6 +471,4 @@
 bool                  regfi_iterator_to_root(REGFI_ITERATOR* i);
 
-bool                  regfi_iterator_find_subkey(REGFI_ITERATOR* i, 
-						 const char* subkey_name);
 bool                  regfi_iterator_walk_path(REGFI_ITERATOR* i, 
 					       const char** path);
@@ -478,10 +479,14 @@
 REGFI_NK_REC*         regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
 REGFI_NK_REC*         regfi_iterator_next_subkey(REGFI_ITERATOR* i);
-
-bool                  regfi_iterator_find_value(REGFI_ITERATOR* i, 
-						const char* value_name);
+bool                  regfi_iterator_find_subkey(REGFI_ITERATOR* i, 
+						 const char* subkey_name);
+
 REGFI_VK_REC*         regfi_iterator_first_value(REGFI_ITERATOR* i);
 REGFI_VK_REC*         regfi_iterator_cur_value(REGFI_ITERATOR* i);
 REGFI_VK_REC*         regfi_iterator_next_value(REGFI_ITERATOR* i);
+bool                  regfi_iterator_find_value(REGFI_ITERATOR* i, 
+						const char* value_name);
+
+REGFI_DATA*           regfi_iterator_cur_data(REGFI_ITERATOR* i);
 
 
@@ -500,9 +505,17 @@
 					   bool strict);
 
+REGFI_BUFFER          regfi_load_data(REGFI_FILE* file, uint32 voffset,
+				      uint32 length, bool data_in_offset,
+				      bool strict);
+
+REGFI_BUFFER          regfi_load_big_data(REGFI_FILE* file, uint32 offset, 
+					  uint32 data_length,uint32 cell_length,
+					  range_list* used_ranges,
+					  bool strict);
+
 /* These are cached so return values don't need to be freed. */
 const REGFI_SK_REC*   regfi_load_sk(REGFI_FILE* file, uint32 offset,
 				    bool strict);
-const REGFI_HBIN*     regfi_lookup_hbin(REGFI_FILE* file, uint32 voffset);
-
+const REGFI_HBIN*     regfi_lookup_hbin(REGFI_FILE* file, uint32 offset);
 
 
@@ -535,13 +548,4 @@
 				     uint32 max_size, bool strict);
 
-REGFI_BUFFER          regfi_load_data(REGFI_FILE* file, 
-				      uint32 data_type, uint32 offset, 
-				      uint32 length, uint32 max_size, 
-				      bool data_in_offset, bool strict);
-
-REGFI_BUFFER          regfi_load_big_data(REGFI_FILE* file, 
-					  uint32 offset, uint32 data_length,
-					  uint32 cell_length, bool strict);
-
 REGFI_SK_REC*         regfi_parse_sk(REGFI_FILE* file, uint32 offset, 
 				     uint32 max_size, bool strict);
@@ -556,4 +560,11 @@
 					    uint16* name_length, 
 					    uint32 max_size, bool strict);
+
+REGFI_BUFFER          regfi_parse_data(REGFI_FILE* file, uint32 offset,
+				       uint32 length, bool strict);
+
+REGFI_BUFFER          regfi_parse_little_data(REGFI_FILE* file, uint32 voffset, 
+					      uint32 length, bool strict);
+
 
 /* Dispose of previously parsed records */
@@ -588,4 +599,5 @@
 REGFI_NK_REC*         regfi_copy_nk(const REGFI_NK_REC* nk);
 REGFI_VK_REC*         regfi_copy_vk(const REGFI_VK_REC* vk);
+int32                 regfi_calc_maxsize(REGFI_FILE* file, uint32 offset);
 
 #endif	/* _REGFI_H */
Index: trunk/include/smb_deps.h
===================================================================
--- trunk/include/smb_deps.h	(revision 152)
+++ trunk/include/smb_deps.h	(revision 157)
@@ -40,11 +40,7 @@
 #include "byteorder.h"
 
-#define DEBUG(lvl,body) 0
-
-void* zalloc(size_t size);
-void* zcalloc(size_t size, unsigned int count);
-
 /* From includes.h */
 
+/* XXX: convert all code to use the more standard "*_t" types */
 #define uint8  uint8_t
 #define int16  int8_t
@@ -52,9 +48,9 @@
 #define int32  int32_t
 #define uint32 uint32_t
+#define int64  int64_t
+#define uint64 uint64_t
 
 #define MIN(a,b) ((a)<(b)?(a):(b))
 #define MAX(a,b) ((a)>(b)?(a):(b))
-
-extern int DEBUGLEVEL;
 
 /* End of stuff from includes.h */
