Index: trunk/lib/regfi.c
===================================================================
--- trunk/lib/regfi.c	(revision 82)
+++ trunk/lib/regfi.c	(revision 84)
@@ -1,5 +1,5 @@
 /*
  * Branched from Samba project Subversion repository, version #7470:
- *   http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/registry/regfio.c
+ *   http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/trunk/source/registry/regfio.c?rev=7470&view=auto
  *
  * Unix SMB/CIFS implementation.
@@ -437,5 +437,5 @@
   depth++;
 	
-  if(!prs_uint8s(true, "header", ps, depth, file->header, sizeof(file->header)))
+  if(!prs_uint8s("header", ps, depth, file->header, sizeof(file->header)))
     return false;
 	
@@ -499,5 +499,5 @@
   depth++;
 	
-  if(!prs_uint8s(true, "header", ps, depth, hbin->header, sizeof(hbin->header)))
+  if(!prs_uint8s("header", ps, depth, hbin->header, sizeof(hbin->header)))
     return false;
 
@@ -547,5 +547,5 @@
     return false;
 	
-  if (!prs_uint8s(true, "header", ps, depth, nk->header, sizeof(nk->header)))
+  if (!prs_uint8s("header", ps, depth, nk->header, sizeof(nk->header)))
     return false;
 		
@@ -610,5 +610,5 @@
 	return false;
 
-    if(!prs_uint8s(true, "name", ps, depth, (uint8*)nk->keyname, name_length))
+    if(!prs_uint8s("name", ps, depth, (uint8*)nk->keyname, name_length))
       return false;
 
@@ -848,5 +848,5 @@
   if ( !prs_uint32( "nk_off", ps, depth, &hash->nk_off ))
     return false;
-  if ( !prs_uint8s( true, "keycheck", ps, depth, hash->keycheck, sizeof( hash->keycheck )) )
+  if ( !prs_uint8s("keycheck", ps, depth, hash->keycheck, sizeof( hash->keycheck )) )
     return false;
 	
@@ -884,5 +884,5 @@
     return false;
 
-  if(!prs_uint8s(true, "header", &hbin->ps, depth, 
+  if(!prs_uint8s("header", &hbin->ps, depth, 
 		 lf->header, sizeof(lf->header)))
     return false;
@@ -938,5 +938,5 @@
     return false;
 
-  if (!prs_uint8s(true, "header", ps, depth, sk->header, sizeof(sk->header)))
+  if (!prs_uint8s("header", ps, depth, sk->header, sizeof(sk->header)))
     return false;
   if ( !prs_uint16( "tag", ps, depth, &tag))
@@ -990,5 +990,5 @@
     return false;
 
-  if ( !prs_uint8s( true, "header", ps, depth, vk->header, sizeof( vk->header )) )
+  if ( !prs_uint8s("header", ps, depth, vk->header, sizeof( vk->header )) )
     return false;
 
@@ -1019,5 +1019,5 @@
 	return false;
     }
-    if ( !prs_uint8s(true, "name", ps, depth, 
+    if ( !prs_uint8s("name", ps, depth, 
 		     (uint8*)vk->valuename, name_length) )
       return false;
@@ -1030,9 +1030,4 @@
   if ( vk->data_size != 0 ) 
   {
-    bool charmode = false;
-
-    if ( (vk->type == REG_SZ) || (vk->type == REG_MULTI_SZ) )
-      charmode = true;
-
     /* the data is stored in the offset if the size <= 4 */
     if ( !(vk->data_size & VK_DATA_IN_OFFSET) ) 
@@ -1067,5 +1062,5 @@
       if ( !prs_uint32( "data_rec_size", &hblock->ps, depth, &data_rec_size ))
 	return false;
-      if(!prs_uint8s(charmode, "data", &hblock->ps, depth, 
+      if(!prs_uint8s("data", &hblock->ps, depth, 
 		     vk->data, vk->data_size))
 	return false;
@@ -1323,5 +1318,5 @@
     if ( !prs_uint32( "record_size", ps, 0, &record_size ) )
       return false;
-    if ( !prs_uint8s( true, "header", ps, 0, header, REC_HDR_SIZE ) )
+    if ( !prs_uint8s("header", ps, 0, header, REC_HDR_SIZE ) )
       return false;
 
@@ -1600,5 +1595,5 @@
     return false;
 
-  subkey = regfi_iterator_cur_subkey(i);
+  subkey = (REGF_NK_REC*)regfi_iterator_cur_subkey(i);
   if(subkey == NULL)
   {
@@ -1667,5 +1662,5 @@
 
   /* XXX: this alloc/free of each sub key might be a bit excessive */
-  subkey = regfi_iterator_first_subkey(i);
+  subkey = (REGF_NK_REC*)regfi_iterator_first_subkey(i);
   while((subkey != NULL) && (found == false))
   {
@@ -1676,5 +1671,5 @@
     {
       regfi_key_free(subkey);
-      subkey = regfi_iterator_next_subkey(i);
+      subkey = (REGF_NK_REC*)regfi_iterator_next_subkey(i);
     }
   }
@@ -1718,5 +1713,5 @@
 /******************************************************************************
  *****************************************************************************/
-REGF_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i)
+const REGF_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i)
 {
   return i->cur_key;
@@ -1726,5 +1721,5 @@
 /******************************************************************************
  *****************************************************************************/
-REGF_NK_REC* regfi_iterator_first_subkey(REGFI_ITERATOR* i)
+const REGF_NK_REC* regfi_iterator_first_subkey(REGFI_ITERATOR* i)
 {
   i->cur_subkey = 0;
@@ -1735,5 +1730,5 @@
 /******************************************************************************
  *****************************************************************************/
-REGF_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)
+const REGF_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i)
 {
   REGF_NK_REC* subkey;
@@ -1778,7 +1773,7 @@
  *****************************************************************************/
 /* XXX: some way of indicating reason for failure should be added. */
-REGF_NK_REC* regfi_iterator_next_subkey(REGFI_ITERATOR* i)
-{
-  REGF_NK_REC* subkey;
+const REGF_NK_REC* regfi_iterator_next_subkey(REGFI_ITERATOR* i)
+{
+  const REGF_NK_REC* subkey;
 
   i->cur_subkey++;
@@ -1796,5 +1791,5 @@
 bool regfi_iterator_find_value(REGFI_ITERATOR* i, const char* value_name)
 {
-  REGF_VK_REC* cur;
+  const REGF_VK_REC* cur;
   bool found = false;
 
@@ -1823,5 +1818,5 @@
 /******************************************************************************
  *****************************************************************************/
-REGF_VK_REC* regfi_iterator_first_value(REGFI_ITERATOR* i)
+const REGF_VK_REC* regfi_iterator_first_value(REGFI_ITERATOR* i)
 {
   i->cur_value = 0;
@@ -1832,5 +1827,5 @@
 /******************************************************************************
  *****************************************************************************/
-REGF_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i)
+const REGF_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i)
 {
   REGF_VK_REC* ret_val = NULL;
@@ -1844,7 +1839,7 @@
 /******************************************************************************
  *****************************************************************************/
-REGF_VK_REC* regfi_iterator_next_value(REGFI_ITERATOR* i)
-{
-  REGF_VK_REC* ret_val;
+const REGF_VK_REC* regfi_iterator_next_value(REGFI_ITERATOR* i)
+{
+  const REGF_VK_REC* ret_val;
 
   i->cur_value++;
Index: trunk/lib/smb_deps.c
===================================================================
--- trunk/lib/smb_deps.c	(revision 82)
+++ trunk/lib/smb_deps.c	(revision 84)
@@ -101,5 +101,5 @@
  converts this to real GMT.
 ****************************************************************************/
-time_t nt_time_to_unix(NTTIME *nt)
+time_t nt_time_to_unix(const NTTIME* nt)
 {
   double d;
@@ -316,5 +316,5 @@
  Stream an array of uint32s. Length is number of uint32s.
  ********************************************************************/
-bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, 
+bool prs_uint32s(const char *name, prs_struct *ps, 
 		 int depth, uint32 *data32s, int len)
 {
@@ -462,5 +462,5 @@
  Stream an array of uint8s. Length is number of uint8s.
  ********************************************************************/
-bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, 
+bool prs_uint8s(const char *name, prs_struct *ps, int depth, 
 		uint8* data8s, int len)
 {
@@ -526,9 +526,9 @@
     return false;
   
-  if(!prs_uint8s (false, "data   ", ps, depth, 
+  if(!prs_uint8s ("data   ", ps, depth, 
 		  uuid->clock_seq, sizeof(uuid->clock_seq)))
     return false;
 
-  if(!prs_uint8s (false, "data   ", ps, depth, uuid->node, sizeof(uuid->node)))
+  if(!prs_uint8s ("data   ", ps, depth, uuid->node, sizeof(uuid->node)))
     return false;
   
@@ -587,5 +587,5 @@
     sid->num_auths = MAXSUBAUTHS;
 
-  if(!prs_uint32s(false, "sub_auths ", ps, depth, 
+  if(!prs_uint32s("sub_auths ", ps, depth, 
 		  sid->sub_auths, sid->num_auths))
   { return false; }
