Index: trunk/lib/regfio.c
===================================================================
--- trunk/lib/regfio.c	(revision 77)
+++ trunk/lib/regfio.c	(revision 78)
@@ -29,6 +29,6 @@
 
 /* Registry types mapping */
-const unsigned int regfio_num_reg_types = 12;
-static const char* regfio_type_names[] =
+const unsigned int regfi_num_reg_types = 12;
+static const char* regfi_type_names[] =
   {"NONE", "SZ", "EXPAND_SZ", "BINARY", "DWORD", "DWORD_BE", "LINK",
    "MULTI_SZ", "RSRC_LIST", "RSRC_DESC", "RSRC_REQ_LIST", "QWORD"};
@@ -36,18 +36,18 @@
 
 /* Returns NULL on error */
-const char* regfio_type_val2str(unsigned int val)
+const char* regfi_type_val2str(unsigned int val)
 {
   if(val == REG_KEY)
     return "KEY";
   
-  if(val >= regfio_num_reg_types)
+  if(val >= regfi_num_reg_types)
     return NULL;
   
-  return regfio_type_names[val];
+  return regfi_type_names[val];
 }
 
 
 /* Returns -1 on error */
-int regfio_type_str2val(const char* str)
+int regfi_type_str2val(const char* str)
 {
   int i;
@@ -56,6 +56,6 @@
     return REG_KEY;
 
-  for(i=0; i < regfio_num_reg_types; i++)
-    if (strcmp(regfio_type_names[i], str) == 0) 
+  for(i=0; i < regfi_num_reg_types; i++)
+    if (strcmp(regfi_type_names[i], str) == 0) 
       return i;
 
@@ -69,5 +69,5 @@
 /* Security descriptor parsing functions  */
 
-const char* regfio_ace_type2str(uint8 type)
+const char* regfi_ace_type2str(uint8 type)
 {
   static const char* map[7] 
@@ -89,5 +89,5 @@
  *   http://msdn2.microsoft.com/en-us/library/aa772242.aspx
  */
-char* regfio_ace_flags2str(uint8 flags)
+char* regfi_ace_flags2str(uint8 flags)
 {
   static const char* flag_map[32] = 
@@ -147,5 +147,5 @@
 
 
-char* regfio_ace_perms2str(uint32 perms)
+char* regfi_ace_perms2str(uint32 perms)
 {
   uint32 i, p;
@@ -226,5 +226,5 @@
 
 
-char* regfio_sid2str(DOM_SID* sid)
+char* regfi_sid2str(DOM_SID* sid)
 {
   uint32 i, size = MAXSUBAUTHS*11 + 24;
@@ -248,5 +248,5 @@
 
 
-char* regfio_get_acl(SEC_ACL* acl)
+char* regfi_get_acl(SEC_ACL* acl)
 {
   uint32 i, extra, size = 0;
@@ -263,8 +263,8 @@
   for (i = 0; i < acl->num_aces && !failed; i++)
   {
-    sid_str = regfio_sid2str(&acl->ace[i].trustee);
-    type_str = regfio_ace_type2str(acl->ace[i].type);
-    perms_str = regfio_ace_perms2str(acl->ace[i].info.mask);
-    flags_str = regfio_ace_flags2str(acl->ace[i].flags);
+    sid_str = regfi_sid2str(&acl->ace[i].trustee);
+    type_str = regfi_ace_type2str(acl->ace[i].type);
+    perms_str = regfi_ace_perms2str(acl->ace[i].info.mask);
+    flags_str = regfi_ace_flags2str(acl->ace[i].flags);
     
     if(flags_str != NULL && perms_str != NULL 
@@ -307,8 +307,8 @@
 
 
-char* regfio_get_sacl(SEC_DESC *sec_desc)
+char* regfi_get_sacl(SEC_DESC *sec_desc)
 {
   if (sec_desc->sacl)
-    return regfio_get_acl(sec_desc->sacl);
+    return regfi_get_acl(sec_desc->sacl);
   else
     return NULL;
@@ -316,8 +316,8 @@
 
 
-char* regfio_get_dacl(SEC_DESC *sec_desc)
+char* regfi_get_dacl(SEC_DESC *sec_desc)
 {
   if (sec_desc->dacl)
-    return regfio_get_acl(sec_desc->dacl);
+    return regfi_get_acl(sec_desc->dacl);
   else
     return NULL;
@@ -325,13 +325,13 @@
 
 
-char* regfio_get_owner(SEC_DESC *sec_desc)
-{
-  return regfio_sid2str(sec_desc->owner_sid);
-}
-
-
-char* regfio_get_group(SEC_DESC *sec_desc)
-{
-  return regfio_sid2str(sec_desc->grp_sid);
+char* regfi_get_owner(SEC_DESC *sec_desc)
+{
+  return regfi_sid2str(sec_desc->owner_sid);
+}
+
+
+char* regfi_get_group(SEC_DESC *sec_desc)
+{
+  return regfi_sid2str(sec_desc->grp_sid);
 }
 
@@ -1368,5 +1368,5 @@
  first hbin offset.
 *******************************************************************/
-REGF_FILE* regfio_open( const char *filename )
+REGF_FILE* regfi_open( const char *filename )
 {
   REGF_FILE *rb;
@@ -1382,5 +1382,5 @@
   /*	if ( !(rb->mem_ctx = talloc_init( "read_regf_block" )) ) 
     {
-    regfio_close( rb );
+    regfi_close( rb );
     return NULL;
     }
@@ -1391,6 +1391,6 @@
 
   if ( (rb->fd = open(filename, flags)) == -1 ) {
-    /* DEBUG(0,("regfio_open: failure to open %s (%s)\n", filename, strerror(errno)));*/
-    regfio_close( rb );
+    /* DEBUG(0,("regfi_open: failure to open %s (%s)\n", filename, strerror(errno)));*/
+    regfi_close( rb );
     return NULL;
   }
@@ -1399,6 +1399,6 @@
 	
   if ( !read_regf_block( rb ) ) {
-    /* DEBUG(0,("regfio_open: Failed to read initial REGF block\n"));*/
-    regfio_close( rb );
+    /* DEBUG(0,("regfi_open: Failed to read initial REGF block\n"));*/
+    regfi_close( rb );
     return NULL;
   }
@@ -1412,5 +1412,5 @@
 /*******************************************************************
  *******************************************************************/
-static void regfio_mem_free( REGF_FILE *file )
+static void regfi_mem_free( REGF_FILE *file )
 {
   /* free any zalloc()'d memory */
@@ -1424,9 +1424,9 @@
 /*******************************************************************
  *******************************************************************/
-int regfio_close( REGF_FILE *file )
+int regfi_close( REGF_FILE *file )
 {
   int fd;
 
-  regfio_mem_free( file );
+  regfi_mem_free( file );
 
   /* nothing to do if there is no open file */
@@ -1447,5 +1447,5 @@
  on my experience.  --jerry
 *******************************************************************/
-REGF_NK_REC* regfio_rootkey( REGF_FILE *file )
+REGF_NK_REC* regfi_rootkey( REGF_FILE *file )
 {
   REGF_NK_REC *nk;
@@ -1459,5 +1459,5 @@
 		
   if ( !(nk = (REGF_NK_REC*)zalloc(sizeof(REGF_NK_REC) )) ) {
-    /*DEBUG(0,("regfio_rootkey: zalloc() failed!\n"));*/
+    /*DEBUG(0,("regfi_rootkey: zalloc() failed!\n"));*/
     return NULL;
   }
@@ -1492,5 +1492,5 @@
 	
   if ( !found ) {
-    /*DEBUG(0,("regfio_rootkey: corrupt registry file ?  No root key record located\n"));*/
+    /*DEBUG(0,("regfi_rootkey: corrupt registry file ?  No root key record located\n"));*/
     return NULL;
   }
@@ -1510,5 +1510,5 @@
  NK record.  Remember that offsets are from the *first* HBIN block.
 *******************************************************************/
-REGF_NK_REC* regfio_fetch_subkey( REGF_FILE *file, REGF_NK_REC *nk )
+REGF_NK_REC* regfi_fetch_subkey( REGF_FILE *file, REGF_NK_REC *nk )
 {
   REGF_NK_REC *subkey;
@@ -1529,5 +1529,5 @@
     return NULL;
   }
-	
+  
   nk_offset = nk->subkeys.hashes[nk->subkey_index].nk_off;
   if(!prs_set_offset(&hbin->ps, 
