s3:registry: extract the reg_util prototypes into their own header.
authorMichael Adam <obnox@samba.org>
Sun, 23 May 2010 14:11:13 +0000 (16:11 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 25 May 2010 08:35:25 +0000 (10:35 +0200)
And use them only where needed.

source3/include/registry.h
source3/registry/reg_api.c
source3/registry/reg_backend_current_version.c
source3/registry/reg_backend_db.c
source3/registry/reg_backend_perflib.c
source3/registry/reg_backend_printing.c
source3/registry/reg_util.c
source3/registry/reg_util.h [new file with mode: 0644]

index a4ecd26842196ab21e9fa71f8ade94c2c2c73c9e..1cb0ea357f7628c195048691ea0a7c6ebb112ac0 100644 (file)
@@ -127,14 +127,6 @@ uint32 reg_perfcount_get_counter_help(uint32 base_index, char **retbuf);
 uint32 reg_perfcount_get_counter_names(uint32 base_index, char **retbuf);
 WERROR reg_perfcount_get_hkpd(prs_struct *ps, uint32 max_buf_size, uint32 *outbuf_len, const char *object_ids);
 
-/* The following definitions come from registry/reg_util.c  */
-
-bool reg_split_path(char *path, char **base, char **new_path);
-bool reg_split_key(char *path, char **base, char **key);
-char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
-void normalize_dbkey(char *key);
-char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
-
 /* The following definitions come from lib/util_reg_api.c  */
 
 WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
index 744428e80bfe441cb2f2c3f31d4f375150c17358..e08bdb523f8e9398fa62386e6be885874c074f48 100644 (file)
@@ -66,6 +66,7 @@
 #include "registry.h"
 #include "reg_cachehook.h"
 #include "regfio.h"
+#include "reg_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 7327dd92042095c65f8514326e4cd9fb393dce59..3bc09eef5b650a7b5e727724f613f21ff86c7b80 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "includes.h"
 #include "registry.h"
+#include "reg_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 278359fa74f544e505fb9cf339af1f0577818893..3f9fdb6a0bc0fd243ead454d5046a0653b25ec43 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "registry.h"
 #include "reg_db.h"
+#include "reg_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index db8e7a3c5db4370d42567d73424a90aea074e090..32f377634a9df3d973e16fbba635ce8c3af8a5ca 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "includes.h"
 #include "registry.h"
+#include "reg_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 25a7ff7583892dd7f1637879506accdcca8e7254..3990fb1c5e437df828a26710cc064fdaead7f3cf 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "registry.h"
+#include "reg_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
index 483523f100163e97c085d34e8346de813a42c26a..f815ffd5f28c595df16ee26d138b781797cf6488 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "includes.h"
 #include "registry.h"
+#include "reg_util.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/registry/reg_util.h b/source3/registry/reg_util.h
new file mode 100644 (file)
index 0000000..886e58c
--- /dev/null
@@ -0,0 +1,29 @@
+/* 
+ *  Unix SMB/CIFS implementation.
+ *  Virtual Windows Registry Layer (utility functions)
+ *  Copyright (C) Gerald Carter                     2002-2005
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _REG_UTIL_H
+#define _REG_UTIL_H
+
+bool reg_split_path(char *path, char **base, char **new_path);
+bool reg_split_key(char *path, char **base, char **key);
+char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname );
+void normalize_dbkey(char *key);
+char *reg_remaining_path(TALLOC_CTX *ctx, const char *key);
+
+#endif /* _REG_UTIL_H */