aboutsummaryrefslogtreecommitdiffstats
path: root/src/configuration.h
diff options
context:
space:
mode:
authorJason Woodward2005-02-21 00:10:08 +0000
committerJason Woodward2005-02-21 00:10:08 +0000
commita41b7c82a4600cb353c85ab87b627e3996a634cb (patch)
tree755db0cf6486487d3f841cf80def2a564d9bbfc8 /src/configuration.h
parent678a60b86186172562d23dbf4e9d502a8a95eca7 (diff)
downloadslapt-get-a41b7c82a4600cb353c85ab87b627e3996a634cb.tar.gz
configuration sources now dynamically created instead of static arrays
Diffstat (limited to 'src/configuration.h')
-rw-r--r--src/configuration.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/configuration.h b/src/configuration.h
index 7ac27ca..dcb7d45 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -20,8 +20,6 @@
#define WORKINGDIR_TOKEN "WORKINGDIR="
#define WORKINGDIR_TOKEN_LEN 256
#define EXCLUDE_TOKEN "EXCLUDE="
-#define MAX_SOURCES 20
-#define MAX_SOURCE_URL_LEN 400
struct exclude_list {
char **excludes;
@@ -29,12 +27,12 @@ struct exclude_list {
};
struct source_list {
- char url[MAX_SOURCES][MAX_SOURCE_URL_LEN];
+ char **url;
unsigned int count;
};
typedef struct {
- struct source_list sources;
+ struct source_list *sources;
char working_dir[WORKINGDIR_TOKEN_LEN];
BOOL_T download_only;
BOOL_T dist_upgrade;
@@ -56,4 +54,5 @@ typedef struct {
rc_config *read_rc_config(const char *file_name);
void working_dir_init(const rc_config *global_config);
void free_rc_config(rc_config *global_config);
-void add_exclude(struct exclude_list *list, char *e);
+void add_exclude(struct exclude_list *list,const char *e);
+void add_source(struct source_list *list,const char *s);