aboutsummaryrefslogtreecommitdiffstats
path: root/src/configuration.h
diff options
context:
space:
mode:
authorJason Woodward2010-06-09 00:24:07 -0400
committerJason Woodward2010-06-09 00:38:39 -0400
commit33eb4afdaaae102ce44232d28c227ba98318d5d3 (patch)
treeceb93c84dbafdac28af7f0063e5e30bb05bdca83 /src/configuration.h
parent8f196b6232e9f4eba6fe340e25c11af917215d17 (diff)
downloadslapt-get-33eb4afdaaae102ce44232d28c227ba98318d5d3.tar.gz
Updated API, generalizing several types into slapt_list_t
Replaced slapt_pkg_action_args_t, struct slapt_exclude_list, and struct slapt_suggests with slapt_list_t, a generic string list type. Added support functions slapt_parse_delimited_list, slapt_init_list, slapt_add_list_item, slapt_remove_list_item, and slapt_free_list in support of slapt_list_t. Removed now unnecessary slapt_init_exclude_list, slapt_add_exclude, slapt_remove_exclude, slapt_free_exclude_list, slapt_init_pkg_action_args, slapt_add_pkg_action_args, and slapt_free_pkg_action_args. Added convenience function slapt_parse_delimited_list that can generate a slapt_list_t from the exclude list, suggestions, dependencies, and conflicts. This greatly simplified the exclude parsing and dependency parsing.
Diffstat (limited to 'src/configuration.h')
-rw-r--r--src/configuration.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/configuration.h b/src/configuration.h
index aee7560..1e601ce 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -6,11 +6,6 @@
#define SLAPT_EXCLUDE_TOKEN "EXCLUDE="
#define SLAPT_SOURCE_ATTRIBUTE_REGEX "(:[A-Z_,]+)$"
-struct slapt_exclude_list {
- char **excludes;
- unsigned int count;
-};
-
typedef struct {
char *url;
SLAPT_PRIORITY_T priority;
@@ -25,7 +20,7 @@ struct slapt_source_list {
typedef struct {
char working_dir[SLAPT_WORKINGDIR_TOKEN_LEN];
struct slapt_source_list *sources;
- struct slapt_exclude_list *exclude_list;
+ slapt_list_t *exclude_list;
int(*progress_cb)(void *,double,double,double,double);
SLAPT_BOOL_T download_only;
SLAPT_BOOL_T dist_upgrade;
@@ -55,15 +50,6 @@ void slapt_free_rc_config(slapt_rc_config *global_config);
/* check that working_dir exists or make it if permissions allow */
void slapt_working_dir_init(const slapt_rc_config *global_config);
-/*
- add an exclude expression to the exclude list.
- commonly called with global_config->exclude_list
-*/
-struct slapt_exclude_list *slapt_init_exclude_list(void);
-void slapt_add_exclude(struct slapt_exclude_list *list,const char *e);
-void slapt_remove_exclude(struct slapt_exclude_list *list,const char *e);
-void slapt_free_exclude_list(struct slapt_exclude_list *list);
-
/* create, destroy the source struct */
slapt_source_t *slapt_init_source(const char *s);
void slapt_free_source(slapt_source_t *src);