Index: trunk/src/reglookup-recover.c
===================================================================
--- trunk/src/reglookup-recover.c	(revision 130)
+++ trunk/src/reglookup-recover.c	(revision 135)
@@ -67,5 +67,5 @@
 
 
-void printKey(REGF_FILE* f, REGF_NK_REC* nk, const char* prefix)
+void printKey(REGFI_FILE* f, REGFI_NK_REC* nk, const char* prefix)
 {
   char mtime[20];
@@ -102,5 +102,5 @@
 
 
-void printValue(REGF_FILE* f, const REGF_VK_REC* vk, const char* prefix)
+void printValue(REGFI_FILE* f, const REGFI_VK_REC* vk, const char* prefix)
 {
   char* quoted_value = NULL;
@@ -122,9 +122,9 @@
    *      stderr/stdout don't always sync nicely.
    */
-  if(size > VK_MAX_DATA_LENGTH)
+  if(size > REGFI_VK_MAX_DATA_LENGTH)
   {
     fprintf(stderr, "WARNING: value data size %d larger than "
-	    "%d, truncating...\n", size, VK_MAX_DATA_LENGTH);
-    size = VK_MAX_DATA_LENGTH;
+	    "%d, truncating...\n", size, REGFI_VK_MAX_DATA_LENGTH);
+    size = REGFI_VK_MAX_DATA_LENGTH;
   }
   
@@ -188,5 +188,5 @@
 
 
-void printSK(REGF_FILE* f, REGF_SK_REC* sk)
+void printSK(REGFI_FILE* f, REGFI_SK_REC* sk)
 {
   char* quoted_raw = NULL;
@@ -226,5 +226,5 @@
 
 
-int printCell(REGF_FILE* f, uint32 offset)
+int printCell(REGFI_FILE* f, uint32 offset)
 {
   char* quoted_buf;
@@ -254,9 +254,9 @@
  *      together is slow and redundant.
  */
-char* getParentPath(REGF_FILE* f, REGF_NK_REC* nk)
-{
-  void_stack* path_stack = void_stack_new(REGF_MAX_DEPTH);
-  REGF_HBIN* hbin;
-  REGF_NK_REC* cur_ancestor;
+char* getParentPath(REGFI_FILE* f, REGFI_NK_REC* nk)
+{
+  void_stack* path_stack = void_stack_new(REGFI_MAX_DEPTH);
+  REGFI_HBIN* hbin;
+  REGFI_NK_REC* cur_ancestor;
   char* ret_val;
   char* path_element;
@@ -267,22 +267,22 @@
   /* The path_stack size limit should guarantee that we don't recurse forever. */
   virt_offset = nk->parent_off;
-  while(virt_offset != REGF_OFFSET_NONE)
+  while(virt_offset != REGFI_OFFSET_NONE)
   {  
     hbin = regfi_lookup_hbin(f, virt_offset);
     if(hbin == NULL)
-      virt_offset = REGF_OFFSET_NONE;
+      virt_offset = REGFI_OFFSET_NONE;
     else
     {
       max_length = hbin->block_size + hbin->file_off 
-	- (virt_offset+REGF_BLOCKSIZE);
-      cur_ancestor = regfi_parse_nk(f, virt_offset+REGF_BLOCKSIZE, 
+	- (virt_offset+REGFI_REGF_SIZE);
+      cur_ancestor = regfi_parse_nk(f, virt_offset+REGFI_REGF_SIZE, 
 				    max_length, true);
       if(cur_ancestor == NULL)
-	virt_offset = REGF_OFFSET_NONE;
+	virt_offset = REGFI_OFFSET_NONE;
       else
       {
-	if((cur_ancestor->key_type == NK_TYPE_ROOTKEY1) 
-	   || (cur_ancestor->key_type == NK_TYPE_ROOTKEY2))
-	  virt_offset = REGF_OFFSET_NONE;
+	if((cur_ancestor->key_type == REGFI_NK_TYPE_ROOTKEY1) 
+	   || (cur_ancestor->key_type == REGFI_NK_TYPE_ROOTKEY2))
+	  virt_offset = REGFI_OFFSET_NONE;
 	else
 	  virt_offset = cur_ancestor->parent_off;
@@ -415,10 +415,10 @@
 
 /* NOTE: unalloc_keys should be an empty range_list. */
-int extractKeys(REGF_FILE* f, 
+int extractKeys(REGFI_FILE* f, 
 		range_list* unalloc_cells, 
 		range_list* unalloc_keys)
 {
   const range_list_element* cur_elem;
-  REGF_NK_REC* key;
+  REGFI_NK_REC* key;
   uint32 i, j;
 
@@ -455,10 +455,10 @@
 
 
-int extractValueLists(REGF_FILE* f,
+int extractValueLists(REGFI_FILE* f,
 		      range_list* unalloc_cells,
 		      range_list* unalloc_keys)
 {
-  REGF_NK_REC* nk;
-  REGF_HBIN* hbin;
+  REGFI_NK_REC* nk;
+  REGFI_HBIN* hbin;
   const range_list_element* cur_elem;
   uint32 i, j, num_keys, off, values_length, max_length;
@@ -472,5 +472,5 @@
     nk = cur_elem->data;
 
-    if(nk->num_values && (nk->values_off!=REGF_OFFSET_NONE))
+    if(nk->num_values && (nk->values_off!=REGFI_OFFSET_NONE))
     {
       hbin = regfi_lookup_hbin(f, nk->values_off);
@@ -478,5 +478,5 @@
       if(hbin != NULL)
       {
-	off = nk->values_off + REGF_BLOCKSIZE;
+	off = nk->values_off + REGFI_REGF_SIZE;
 	max_length = hbin->block_size + hbin->file_off - off;
 	/* XXX: This is a hack.  We parse all value-lists, VK records,
@@ -546,5 +546,5 @@
 		  if(nk->values[j]->data != NULL && !nk->values[j]->data_in_offset)
 		  {
-		    off = nk->values[j]->data_off+REGF_BLOCKSIZE;
+		    off = nk->values[j]->data_off+REGFI_REGF_SIZE;
 		    if(!range_list_has_range(unalloc_cells, off, 
 					     nk->values[j]->data_size))
@@ -576,10 +576,10 @@
 
 /* NOTE: unalloc_values should be an empty range_list. */
-int extractValues(REGF_FILE* f,
+int extractValues(REGFI_FILE* f,
 		  range_list* unalloc_cells,
 		  range_list* unalloc_values)
 {
   const range_list_element* cur_elem;
-  REGF_VK_REC* vk;
+  REGFI_VK_REC* vk;
   uint32 i, j, off;
 
@@ -616,5 +616,5 @@
   {
     cur_elem = range_list_get(unalloc_values, i);
-    vk = (REGF_VK_REC*)cur_elem->data;
+    vk = (REGFI_VK_REC*)cur_elem->data;
     if(vk == NULL)
       return 40;
@@ -622,5 +622,5 @@
     if(vk->data != NULL && !vk->data_in_offset)
     {
-      off = vk->data_off+REGF_BLOCKSIZE;
+      off = vk->data_off+REGFI_REGF_SIZE;
       if(!range_list_has_range(unalloc_cells, off, vk->data_size))
       { /* We've parsed a data cell which isn't in the unallocated 
@@ -643,10 +643,10 @@
 
 /* NOTE: unalloc_sks should be an empty range_list. */
-int extractSKs(REGF_FILE* f, 
+int extractSKs(REGFI_FILE* f, 
 	       range_list* unalloc_cells,
 	       range_list* unalloc_sks)
 {
   const range_list_element* cur_elem;
-  REGF_SK_REC* sk;
+  REGFI_SK_REC* sk;
   uint32 i, j;
 
@@ -684,5 +684,5 @@
 int main(int argc, char** argv)
 { 
-  REGF_FILE* f;
+  REGFI_FILE* f;
   const range_list_element* cur_elem;
   range_list* unalloc_cells;
@@ -693,6 +693,6 @@
   char* tmp_name;
   char* tmp_path;
-  REGF_NK_REC* tmp_key;
-  REGF_VK_REC* tmp_value;
+  REGFI_NK_REC* tmp_key;
+  REGFI_VK_REC* tmp_value;
   uint32 argi, arge, i, j, ret, num_unalloc_keys;
   /* uint32 test_offset;*/
@@ -806,5 +806,5 @@
   {
     cur_elem = range_list_get(unalloc_keys, i);
-    tmp_key = (REGF_NK_REC*)cur_elem->data;
+    tmp_key = (REGFI_NK_REC*)cur_elem->data;
 
     if(tmp_key == NULL)
@@ -821,5 +821,5 @@
   {
     cur_elem = range_list_get(unalloc_keys, i);
-    tmp_key = (REGF_NK_REC*)cur_elem->data;
+    tmp_key = (REGFI_NK_REC*)cur_elem->data;
 
     printKey(f, tmp_key, parent_paths[i]);
@@ -848,5 +848,5 @@
   {
     cur_elem = range_list_get(unalloc_values, i);
-    tmp_value = (REGF_VK_REC*)cur_elem->data; 
+    tmp_value = (REGFI_VK_REC*)cur_elem->data; 
 
     printValue(f, tmp_value, "");
