API change! rc_config_env is renamed to rc_make_env and takes no argument.

This commit is contained in:
Roy Marples 2007-09-18 12:20:55 +00:00
parent 807e4afbed
commit c8b03c96b7
6 changed files with 9 additions and 6 deletions

View File

@ -3,6 +3,8 @@
18 Sep 2007; Roy Marples <uberlord@gentoo.org>:
API change! rc_config_env is renamed to rc_make_env and takes no argument.
API change! rc_ls_dir, rc_get_config and rc_get_list no longer take
a starting list as a first argument. Instead, use rc_strlist_join
to append or prepend the new list to an existing list.

View File

@ -578,8 +578,9 @@ static bool file_regex (const char *file, const char *regex)
}
#endif
char **rc_config_env (char **env)
char **rc_make_env (void)
{
char **env = NULL;
char *line;
int i;
char *p;
@ -723,4 +724,4 @@ char **rc_config_env (char **env)
return (env);
}
librc_hidden_def(rc_config_env)
librc_hidden_def(rc_make_env)

View File

@ -50,7 +50,6 @@
#define librc_hidden_def(x) hidden_def(x)
librc_hidden_proto(rc_allow_plug)
librc_hidden_proto(rc_config_env)
librc_hidden_proto(rc_exists)
librc_hidden_proto(rc_filter_env)
librc_hidden_proto(rc_find_pids)
@ -71,6 +70,7 @@ librc_hidden_proto(rc_is_file)
librc_hidden_proto(rc_is_link)
librc_hidden_proto(rc_load_deptree)
librc_hidden_proto(rc_ls_dir)
librc_hidden_proto(rc_make_env)
librc_hidden_proto(rc_mark_service)
librc_hidden_proto(rc_order_services)
librc_hidden_proto(rc_resolve_service)

View File

@ -815,7 +815,7 @@ int main (int argc, char **argv)
/* Ensure our environment is pure
Also, add our configuration to it */
env = rc_filter_env ();
env = rc_config_env (env);
env = rc_strlist_join (env, rc_make_env ());
if (env) {
char *p;

View File

@ -194,7 +194,7 @@ char *rc_get_config_entry (char **list, const char *entry);
/* Make an environment list which filters out all unwanted values
and loads it up with our RC config */
char **rc_filter_env (void);
char **rc_config_env (char **env);
char **rc_make_env (void);
/* Handy functions for dealing with string arrays of char ** */
char *rc_strlist_add (char ***list, const char *item);

View File

@ -1049,7 +1049,7 @@ int runscript (int argc, char **argv)
/* Ensure our environment is pure
Also, add our configuration to it */
env = rc_filter_env ();
env = rc_config_env (env);
env = rc_strlist_join (env, rc_make_env ());
if (env) {
char *p;