From: Michael Adam Date: Sun, 23 May 2010 14:11:13 +0000 (+0200) Subject: s3:registry: extract the reg_util prototypes into their own header. X-Git-Tag: release-3-6-0pre1~1706 X-Git-Url: http://git.samba.org/?p=amitay%2Fsamba.git;a=commitdiff_plain;h=4ae77b2ef9ef5f936055b03a7fb96231a069683b s3:registry: extract the reg_util prototypes into their own header. And use them only where needed. --- diff --git a/source3/include/registry.h b/source3/include/registry.h index a4ecd268421..1cb0ea357f7 100644 --- a/source3/include/registry.h +++ b/source3/include/registry.h @@ -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, diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 744428e80bf..e08bdb523f8 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -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 diff --git a/source3/registry/reg_backend_current_version.c b/source3/registry/reg_backend_current_version.c index 7327dd92042..3bc09eef5b6 100644 --- a/source3/registry/reg_backend_current_version.c +++ b/source3/registry/reg_backend_current_version.c @@ -26,6 +26,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_backend_db.c b/source3/registry/reg_backend_db.c index 278359fa74f..3f9fdb6a0bc 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -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 diff --git a/source3/registry/reg_backend_perflib.c b/source3/registry/reg_backend_perflib.c index db8e7a3c5db..32f377634a9 100644 --- a/source3/registry/reg_backend_perflib.c +++ b/source3/registry/reg_backend_perflib.c @@ -26,6 +26,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_backend_printing.c b/source3/registry/reg_backend_printing.c index 25a7ff75838..3990fb1c5e4 100644 --- a/source3/registry/reg_backend_printing.c +++ b/source3/registry/reg_backend_printing.c @@ -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.c b/source3/registry/reg_util.c index 483523f1001..f815ffd5f28 100644 --- a/source3/registry/reg_util.c +++ b/source3/registry/reg_util.c @@ -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 index 00000000000..886e58cda19 --- /dev/null +++ b/source3/registry/reg_util.h @@ -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 . + */ + +#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 */