aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2004-11-27 03:06:56 +0000
committerJason Woodward2004-11-27 03:06:56 +0000
commit800f12459bb0b087504f92f6801d37bcf4632c8e (patch)
treec127c441f84150f2f2806fa87034b5036192b945 /src
parenta10bd8d7a1b62487b51292f3799bd29268bb1657 (diff)
downloadslapt-get-800f12459bb0b087504f92f6801d37bcf4632c8e.tar.gz
changed transaction to transaction_t
Diffstat (limited to 'src')
-rw-r--r--src/action.c6
-rw-r--r--src/transaction.c30
2 files changed, 18 insertions, 18 deletions
diff --git a/src/action.c b/src/action.c
index c5debed..831d422 100644
--- a/src/action.c
+++ b/src/action.c
@@ -21,7 +21,7 @@
/* install pkg */
void pkg_action_install(const rc_config *global_config,const pkg_action_args_t *action_args){
int i;
- transaction tran;
+ transaction_t tran;
struct pkg_list *installed_pkgs;
struct pkg_list *avail_pkgs;
sg_regex pkg_regex;
@@ -201,7 +201,7 @@ void pkg_action_remove(const rc_config *global_config,const pkg_action_args_t *a
int i;
struct pkg_list *installed_pkgs;
struct pkg_list *available;
- transaction tran;
+ transaction_t tran;
installed_pkgs = get_installed_pkgs();
available = get_available_pkgs();
@@ -372,7 +372,7 @@ void pkg_action_upgrade_all(const rc_config *global_config){
int i;
struct pkg_list *installed_pkgs;
struct pkg_list *avail_pkgs;
- transaction tran;
+ transaction_t tran;
printf(_("Reading Package Lists... "));
installed_pkgs = get_installed_pkgs();
diff --git a/src/transaction.c b/src/transaction.c
index f30ef71..d1c1747 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -17,9 +17,9 @@
*/
#include <main.h>
-static void add_suggestion(transaction *tran, pkg_info_t *pkg);
+static void add_suggestion(transaction_t *tran, pkg_info_t *pkg);
-void init_transaction(transaction *tran){
+void init_transaction(transaction_t *tran){
tran->install_pkgs = malloc( sizeof *tran->install_pkgs );
tran->remove_pkgs = malloc( sizeof *tran->remove_pkgs );
@@ -40,7 +40,7 @@ void init_transaction(transaction *tran){
tran->exclude_pkgs->pkg_count = 0;
}
-int handle_transaction(const rc_config *global_config, transaction *tran){
+int handle_transaction(const rc_config *global_config, transaction_t *tran){
int i;
size_t download_size = 0;
size_t already_download_size = 0;
@@ -226,7 +226,7 @@ int handle_transaction(const rc_config *global_config, transaction *tran){
return 0;
}
-void add_install_to_transaction(transaction *tran,pkg_info_t *pkg){
+void add_install_to_transaction(transaction_t *tran,pkg_info_t *pkg){
pkg_info_t **tmp_list;
/* don't add if already present in the transaction */
@@ -259,7 +259,7 @@ void add_install_to_transaction(transaction *tran,pkg_info_t *pkg){
}
-void add_remove_to_transaction(transaction *tran,pkg_info_t *pkg){
+void add_remove_to_transaction(transaction_t *tran,pkg_info_t *pkg){
pkg_info_t **tmp_list;
/* don't add if already present in the transaction */
@@ -290,7 +290,7 @@ void add_remove_to_transaction(transaction *tran,pkg_info_t *pkg){
}
-void add_exclude_to_transaction(transaction *tran,pkg_info_t *pkg){
+void add_exclude_to_transaction(transaction_t *tran,pkg_info_t *pkg){
pkg_info_t **tmp_list;
/* don't add if already present in the transaction */
@@ -322,7 +322,7 @@ void add_exclude_to_transaction(transaction *tran,pkg_info_t *pkg){
}
void add_upgrade_to_transaction(
- transaction *tran, pkg_info_t *installed_pkg, pkg_info_t *upgrade_pkg
+ transaction_t *tran, pkg_info_t *installed_pkg, pkg_info_t *upgrade_pkg
){
pkg_upgrade_t **tmp_list;
@@ -366,7 +366,7 @@ void add_upgrade_to_transaction(
}
-int search_transaction(transaction *tran,pkg_info_t *pkg){
+int search_transaction(transaction_t *tran,pkg_info_t *pkg){
int i,found = 1, not_found = 0;
for(i = 0; i < tran->install_pkgs->pkg_count;i++){
@@ -388,7 +388,7 @@ int search_transaction(transaction *tran,pkg_info_t *pkg){
return not_found;
}
-static int search_upgrade_transaction(transaction *tran,pkg_info_t *pkg){
+static int search_upgrade_transaction(transaction_t *tran,pkg_info_t *pkg){
int i,found = 1, not_found = 0;
for(i = 0; i < tran->upgrade_pkgs->pkg_count;i++){
if( strcmp(pkg->name,tran->upgrade_pkgs->pkgs[i]->upgrade->name)==0 )
@@ -397,7 +397,7 @@ static int search_upgrade_transaction(transaction *tran,pkg_info_t *pkg){
return not_found;
}
-void free_transaction(transaction *tran){
+void free_transaction(transaction_t *tran){
int i;
for(i = 0;i < tran->install_pkgs->pkg_count; i++){
@@ -430,9 +430,9 @@ void free_transaction(transaction *tran){
}
-transaction *remove_from_transaction(transaction *tran,pkg_info_t *pkg){
+transaction_t *remove_from_transaction(transaction_t *tran,pkg_info_t *pkg){
int i;
- transaction *new_tran = NULL;
+ transaction_t *new_tran = NULL;
if( search_transaction(tran,pkg) == 0 )
return tran;
@@ -483,7 +483,7 @@ transaction *remove_from_transaction(transaction *tran,pkg_info_t *pkg){
/* parse the dependencies for a package, and add them to the transaction as needed */
/* check to see if a package is conflicted */
-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){
+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){
int c,dep_return = -1;
struct pkg_list *deps;
@@ -544,7 +544,7 @@ int add_deps_to_trans(const rc_config *global_config, transaction *tran, struct
}
/* make sure pkg isn't conflicted with what's already in the transaction */
-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){
int i;
struct pkg_list *conflicts;
@@ -578,7 +578,7 @@ pkg_info_t *is_conflicted(transaction *tran, struct pkg_list *avail_pkgs, struct
return NULL;
}
-static void add_suggestion(transaction *tran, pkg_info_t *pkg){
+static void add_suggestion(transaction_t *tran, pkg_info_t *pkg){
char *tmp_buffer;
if( pkg->suggests == NULL || strlen(pkg->suggests) == 0 ){