diff options
| author | Theodore Tso <tytso@mit.edu> | 1998-11-03 22:49:25 +0000 |
|---|---|---|
| committer | Theodore Tso <tytso@mit.edu> | 1998-11-03 22:49:25 +0000 |
| commit | a77feae4293dbdba211ca39a275da85e7c3b655f (patch) | |
| tree | e5d2dd560fe394343167007cc7e9c7bb04c240e1 /src/util/profile/prof_int.h | |
| parent | 186666be751244e0382e41cc175b5eb9e888b34d (diff) | |
| download | krb5-a77feae4293dbdba211ca39a275da85e7c3b655f.tar.gz krb5-a77feae4293dbdba211ca39a275da85e7c3b655f.tar.xz krb5-a77feae4293dbdba211ca39a275da85e7c3b655f.zip | |
Makefile.in: Added prof_get.c to the list of files to be compiled
profile.hin: Added declarations for profile_free_list(),
profile_get_relation_names(), and profile_get_subsection_names().
(These are new public interfaces to the profile library.)
prof_int.h: Removed the profile_section_t structure, which was used
only by the now-defunct prof_section.c file. Added the internal
interfaces for the new public interfaces. Removed unused declarations
which were never implemented(profile_get, profile_update).
prof_init.c: Moved all of the profile querying functions
(profile_get_values(), profile_get_value(), etc.) to prof_get.c. In
the process, removed the really bletcherous (and badly implemented)
profile_get_first_values(), which did nothing like what the named
implied. Also added to prof_get.c new functions
profile_get_subsection_names() and profile_get_relation_names().
(profile_ser_internalize): Rewrote error handling to be clearer, and
removed a bug where memory was not freed correctly in an error case.
(profile_init): If a list of pathnames is passed in, profile_init will
now try to open all of them, now that we've defined query fallback
semantics in prof_get.c
prof_parse.c: Fix lint warning.
prof_tree.c (profile_find_node_relation,
profile_find_node_subsection): Allow the returned value or subsection
field to be NULL (in case the caller isn't interested in getting the
returned value or subsection, and only cares about getting the name).
(profile_delete_node_relation, profile_delete_interior_node_relation):
Removed these functions and replaced it with profile_remove_node(),
which takes a boolean argument section_flag.
(profile_find_node_name): Removed this function. (This was a
Cygnus/Fusion special used by the now removed
profile_find_first_values() function.)
test_profile.c: Added commands to test the new
profile_get_subsection_names() and profile_get_relation_names()
interfaces.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11011 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/profile/prof_int.h')
| -rw-r--r-- | src/util/profile/prof_int.h | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/util/profile/prof_int.h b/src/util/profile/prof_int.h index 2096bd66d..8a45ec423 100644 --- a/src/util/profile/prof_int.h +++ b/src/util/profile/prof_int.h @@ -60,27 +60,7 @@ struct _profile_t { typedef struct _profile_t *profile_t; -/* - * This structure defines the profile_section_t object, which is - * returned to the user when a section is searched. - */ -struct _profile_section_t { - prf_magic_t magic; - int top_lvl:1, top_lvl_search:1; - char *name; - void *state; - struct profile_node *parent, *sect; - profile_t profile; - prf_file_t file_ptr; -}; - -typedef struct _profile_section_t *profile_section_t; - -errcode_t profile_get - PROTOTYPE((const char *filename, prf_file_t *ret_prof)); - -errcode_t profile_update - PROTOTYPE((prf_file_t profile)); +/* profile_parse.c */ errcode_t profile_parse_file PROTOTYPE((FILE *f, struct profile_node **root)); @@ -145,9 +125,15 @@ errcode_t profile_init_path void profile_release PROTOTYPE ((profile_t profile)); +/* prof_get.c */ + +KRB5_DLLIMP void KRB5_CALLCONV profile_free_list + PROTOTYPE ((char **list)); KRB5_DLLIMP errcode_t KRB5_CALLCONV profile_get_values - PROTOTYPE ((profile_t profile, const char **names, char ***ret_values)); + PROTOTYPE ((profile_t profile, const char **names, + char ***ret_values)); + errcode_t profile_get_string PROTOTYPE((profile_t profile, const char *name, const char *subname, const char *subsubname, const char *def_val, @@ -156,3 +142,10 @@ errcode_t profile_get_integer PROTOTYPE((profile_t profile, const char *name, const char *subname, const char *subsubname, int def_val, int *ret_default)); + +errcode_t profile_get_relation_names + PROTOTYPE((profile_t profile, const char **names, char ***ret_names)); + +errcode_t profile_get_subsection_names + PROTOTYPE((profile_t profile, const char **names, char ***ret_names)); + |
