aboutsummaryrefslogtreecommitdiffstats
path: root/src/configuration.h
diff options
context:
space:
mode:
authorJason Woodward2005-06-29 17:36:29 +0000
committerJason Woodward2005-06-29 17:36:29 +0000
commitbfbcac116296ce0ea0085dd48791e86d33c49497 (patch)
tree0208846a2dfc476a735a86302b00ab6ad21e428e /src/configuration.h
parent09087a0d063083d159e8fe89737dc2fe8144e894 (diff)
downloadslapt-get-bfbcac116296ce0ea0085dd48791e86d33c49497.tar.gz
updated comments for api documentation
Diffstat (limited to 'src/configuration.h')
-rw-r--r--src/configuration.h42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/configuration.h b/src/configuration.h
index 90b825f..cde81d4 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -1,20 +1,3 @@
-/*
- * Copyright (C) 2003,2004,2005 Jason Woodward <woodwardj at jaos dot org>
- *
- * 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 2 of the License, or
- * 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 Library General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
#define SOURCE_TOKEN "SOURCE="
#define WORKINGDIR_TOKEN "WORKINGDIR="
@@ -34,12 +17,12 @@ struct source_list {
typedef struct {
struct source_list *sources;
char working_dir[WORKINGDIR_TOKEN_LEN];
+ struct exclude_list *exclude_list;
BOOL_T download_only;
BOOL_T dist_upgrade;
BOOL_T simulate;
BOOL_T no_prompt;
BOOL_T re_install;
- struct exclude_list *exclude_list;
BOOL_T ignore_excludes;
BOOL_T no_md5_check;
BOOL_T ignore_dep;
@@ -51,8 +34,31 @@ typedef struct {
} rc_config;
+/*
+ read the configuration from file_name
+ returns (rc_config *) or NULL
+*/
rc_config *read_rc_config(const char *file_name);
+
+/*
+ check that working_dir exists or make it if permissions allow
+*/
void working_dir_init(const rc_config *global_config);
+
+/*
+ free rc_config structure
+*/
void free_rc_config(rc_config *global_config);
+
+/*
+ add an exclude expression to the exclude list.
+ commonly called with global_config->exclude_list
+*/
void add_exclude(struct exclude_list *list,const char *e);
+
+/*
+ add an source expression to the source list.
+ commonly called with global_config->source_list
+*/
void add_source(struct source_list *list,const char *s);
+