aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2004-11-27 03:06:22 +0000
committerJason Woodward2004-11-27 03:06:22 +0000
commita10bd8d7a1b62487b51292f3799bd29268bb1657 (patch)
tree59a86d9733d28e836487ed10acc80f5c5d3e59d5 /src
parent863b6711d39593938d54f7b615b2b70e75a55871 (diff)
downloadslapt-get-a10bd8d7a1b62487b51292f3799bd29268bb1657.tar.gz
redifined typedefs, and changed transaction to transaction_t
Diffstat (limited to 'src')
-rw-r--r--src/action.h5
-rw-r--r--src/common.h5
-rw-r--r--src/configuration.h5
-rw-r--r--src/package.h13
-rw-r--r--src/transaction.h27
5 files changed, 26 insertions, 29 deletions
diff --git a/src/action.h b/src/action.h
index 2b13f5a..14625bd 100644
--- a/src/action.h
+++ b/src/action.h
@@ -16,11 +16,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-struct _pkg_action_args {
+typedef struct {
char **pkgs;
int count;
-};
-typedef struct _pkg_action_args pkg_action_args_t;
+} pkg_action_args_t;
pkg_action_args_t *init_pkg_action_args(int arg_count);
void free_pkg_action_args(pkg_action_args_t *paa);
diff --git a/src/common.h b/src/common.h
index f863b80..765b9f4 100644
--- a/src/common.h
+++ b/src/common.h
@@ -21,13 +21,12 @@
#define SLACK_BASE_SET_REGEX "^./slackware/a$"
-struct _sg_regex {
+typedef struct {
regex_t regex;
size_t nmatch;
regmatch_t pmatch[MAX_REGEX_PARTS];
int reg_return;
-};
-typedef struct _sg_regex sg_regex;
+} sg_regex;
FILE *open_file(const char *file_name,const char *mode);
diff --git a/src/configuration.h b/src/configuration.h
index e677f86..7cd8ce1 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -33,7 +33,7 @@ struct source_list {
int count;
};
-struct _configuration {
+typedef struct {
struct source_list sources;
char working_dir[WORKINGDIR_TOKEN_LEN];
int download_only;
@@ -48,8 +48,7 @@ struct _configuration {
int disable_dep_check;
int print_uris;
int dl_stats;
-};
-typedef struct _configuration rc_config;
+} rc_config;
rc_config *read_rc_config(const char *file_name);
void working_dir_init(const rc_config *global_config);
diff --git a/src/package.h b/src/package.h
index fa9072b..ce9d0ba 100644
--- a/src/package.h
+++ b/src/package.h
@@ -51,7 +51,7 @@
#define CHECKSUM_FILE "CHECKSUMS.md5"
#define HEAD_FILE_EXT ".head"
-struct _pkg_info {
+typedef struct {
char name[NAME_LEN];
char version[VERSION_LEN];
char mirror[MIRROR_LEN];
@@ -63,17 +63,18 @@ struct _pkg_info {
char conflicts[CONFLICTS_LEN];
char suggests[SUGGESTS_LEN];
char md5[MD5_STR_LEN];
-};
-typedef struct _pkg_info pkg_info_t;
+} pkg_info_t;
+
struct pkg_list {
pkg_info_t **pkgs;
int pkg_count;
};
-struct _pkg_upgrade {
+
+typedef struct {
pkg_info_t *installed;
pkg_info_t *upgrade;
-};
-typedef struct _pkg_upgrade pkg_upgrade_t;
+} pkg_upgrade_t;
+
struct pkg_upgrade_list {
pkg_upgrade_t **pkgs;
int pkg_count;
diff --git a/src/transaction.h b/src/transaction.h
index 39f1e80..7670e48 100644
--- a/src/transaction.h
+++ b/src/transaction.h
@@ -16,25 +16,24 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-struct _transaction {
+typedef struct {
struct pkg_list *install_pkgs;
struct pkg_upgrade_list *upgrade_pkgs;
struct pkg_list *remove_pkgs;
struct pkg_list *exclude_pkgs;
char *suggests;
-};
-typedef struct _transaction transaction;
+} transaction_t;
-void init_transaction(transaction *);
-int handle_transaction(const rc_config *,transaction *);
-void add_install_to_transaction(transaction *,pkg_info_t *pkg);
-void add_remove_to_transaction(transaction *,pkg_info_t *pkg);
-void add_upgrade_to_transaction(transaction *,pkg_info_t *installed_pkg,pkg_info_t *upgrade_pkg);
-void add_exclude_to_transaction(transaction *,pkg_info_t *pkg);
-int search_transaction(transaction *,pkg_info_t *pkg);
-void free_transaction(transaction *);
-transaction *remove_from_transaction(transaction *tran,pkg_info_t *pkg);
-int add_deps_to_trans(const rc_config *global_config, transaction *tran, struct pkg_list *avail_pkgs, struct pkg_list *installed_pkgs, pkg_info_t *pkg);
+void init_transaction(transaction_t *);
+int handle_transaction(const rc_config *,transaction_t *);
+void add_install_to_transaction(transaction_t *,pkg_info_t *pkg);
+void add_remove_to_transaction(transaction_t *,pkg_info_t *pkg);
+void add_upgrade_to_transaction(transaction_t *,pkg_info_t *installed_pkg,pkg_info_t *upgrade_pkg);
+void add_exclude_to_transaction(transaction_t *,pkg_info_t *pkg);
+int search_transaction(transaction_t *,pkg_info_t *pkg);
+void free_transaction(transaction_t *);
+transaction_t *remove_from_transaction(transaction_t *tran,pkg_info_t *pkg);
+int add_deps_to_trans(const rc_config *global_config, transaction_t *tran, struct pkg_list *avail_pkgs, struct pkg_list *installed_pkgs, pkg_info_t *pkg);
/* check to see if a package is conflicted */
-pkg_info_t *is_conflicted(transaction *tran, struct pkg_list *avail_pkgs, struct pkg_list *installed_pkgs, pkg_info_t *pkg);
+pkg_info_t *is_conflicted(transaction_t *tran, struct pkg_list *avail_pkgs, struct pkg_list *installed_pkgs, pkg_info_t *pkg);