summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-06-28 14:33:55 +1000
committerAllan McRae <allan@archlinux.org>2011-06-28 23:28:23 +1000
commit220842b37ba484a452f5e4d8071d91d3f2b6c2d4 (patch)
treea2ceee8059e1809996c4023c8ff31ad25552fb85 /lib/libalpm
parent6d876f9b6be055d54e50d42a34c267aad64c0b21 (diff)
downloadpacman-220842b37ba484a452f5e4d8071d91d3f2b6c2d4.tar.xz
Rename pmconflict_t to alpm_conflict_t
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm.h4
-rw-r--r--lib/libalpm/conflict.c22
-rw-r--r--lib/libalpm/conflict.h4
-rw-r--r--lib/libalpm/sync.c8
4 files changed, 19 insertions, 19 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 53ff4a9f..ff966f18 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -122,11 +122,11 @@ typedef struct _alpm_depmissing_t {
} alpm_depmissing_t;
/** Conflict */
-typedef struct _pmconflict_t {
+typedef struct _alpm_conflict_t {
char *package1;
char *package2;
char *reason;
-} pmconflict_t;
+} alpm_conflict_t;
/** File conflict */
typedef struct _pmfileconflict_t {
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 1e535122..83a1fa5f 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -40,12 +40,12 @@
#include "log.h"
#include "deps.h"
-static pmconflict_t *conflict_new(const char *package1, const char *package2,
+static alpm_conflict_t *conflict_new(const char *package1, const char *package2,
const char *reason)
{
- pmconflict_t *conflict;
+ alpm_conflict_t *conflict;
- MALLOC(conflict, sizeof(pmconflict_t), return NULL);
+ MALLOC(conflict, sizeof(alpm_conflict_t), return NULL);
STRDUP(conflict->package1, package1, return NULL);
STRDUP(conflict->package2, package2, return NULL);
@@ -54,7 +54,7 @@ static pmconflict_t *conflict_new(const char *package1, const char *package2,
return conflict;
}
-void _alpm_conflict_free(pmconflict_t *conflict)
+void _alpm_conflict_free(alpm_conflict_t *conflict)
{
FREE(conflict->package2);
FREE(conflict->package1);
@@ -62,10 +62,10 @@ void _alpm_conflict_free(pmconflict_t *conflict)
FREE(conflict);
}
-pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict)
+alpm_conflict_t *_alpm_conflict_dup(const alpm_conflict_t *conflict)
{
- pmconflict_t *newconflict;
- CALLOC(newconflict, 1, sizeof(pmconflict_t), );
+ alpm_conflict_t *newconflict;
+ CALLOC(newconflict, 1, sizeof(alpm_conflict_t), );
STRDUP(newconflict->package1, conflict->package1, return NULL);
STRDUP(newconflict->package2, conflict->package2, return NULL);
@@ -74,14 +74,14 @@ pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict)
return newconflict;
}
-static int conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
+static int conflict_isin(alpm_conflict_t *needle, alpm_list_t *haystack)
{
alpm_list_t *i;
const char *npkg1 = needle->package1;
const char *npkg2 = needle->package2;
for(i = haystack; i; i = i->next) {
- pmconflict_t *conflict = i->data;
+ alpm_conflict_t *conflict = i->data;
const char *cpkg1 = conflict->package1;
const char *cpkg2 = conflict->package2;
if((strcmp(cpkg1, npkg1) == 0 && strcmp(cpkg2, npkg2) == 0)
@@ -103,7 +103,7 @@ static int conflict_isin(pmconflict_t *needle, alpm_list_t *haystack)
static int add_conflict(alpm_handle_t *handle, alpm_list_t **baddeps,
const char *pkg1, const char *pkg2, const char *reason)
{
- pmconflict_t *conflict = conflict_new(pkg1, pkg2, reason);
+ alpm_conflict_t *conflict = conflict_new(pkg1, pkg2, reason);
if(!conflict) {
return -1;
}
@@ -209,7 +209,7 @@ alpm_list_t *_alpm_outerconflicts(alpm_db_t *db, alpm_list_t *packages)
*
* @param handle the context handle
* @param pkglist the list of packages to check
- * @return an alpm_list_t of pmconflict_t
+ * @return an alpm_list_t of alpm_conflict_t
*/
alpm_list_t SYMEXPORT *alpm_checkconflicts(alpm_handle_t *handle,
alpm_list_t *pkglist)
diff --git a/lib/libalpm/conflict.h b/lib/libalpm/conflict.h
index 83266959..4edbe620 100644
--- a/lib/libalpm/conflict.h
+++ b/lib/libalpm/conflict.h
@@ -24,8 +24,8 @@
#include "db.h"
#include "package.h"
-pmconflict_t *_alpm_conflict_dup(const pmconflict_t *conflict);
-void _alpm_conflict_free(pmconflict_t *conflict);
+alpm_conflict_t *_alpm_conflict_dup(const alpm_conflict_t *conflict);
+void _alpm_conflict_free(alpm_conflict_t *conflict);
alpm_list_t *_alpm_innerconflicts(alpm_handle_t *handle, alpm_list_t *packages);
alpm_list_t *_alpm_outerconflicts(alpm_db_t *db, alpm_list_t *packages);
alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index e3dda23d..954253d9 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -405,7 +405,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
deps = _alpm_innerconflicts(handle, trans->add);
for(i = deps; i; i = i->next) {
- pmconflict_t *conflict = i->data;
+ alpm_conflict_t *conflict = i->data;
alpm_pkg_t *rsync, *sync, *sync1, *sync2;
/* have we already removed one of the conflicting targets? */
@@ -432,7 +432,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
handle->pm_errno = PM_ERR_CONFLICTING_DEPS;
ret = -1;
if(data) {
- pmconflict_t *newconflict = _alpm_conflict_dup(conflict);
+ alpm_conflict_t *newconflict = _alpm_conflict_dup(conflict);
if(newconflict) {
*data = alpm_list_add(*data, newconflict);
}
@@ -464,7 +464,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
deps = _alpm_outerconflicts(handle->db_local, trans->add);
for(i = deps; i; i = i->next) {
- pmconflict_t *conflict = i->data;
+ alpm_conflict_t *conflict = i->data;
/* if conflict->package2 (the local package) is not elected for removal,
we ask the user */
@@ -496,7 +496,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
handle->pm_errno = PM_ERR_CONFLICTING_DEPS;
ret = -1;
if(data) {
- pmconflict_t *newconflict = _alpm_conflict_dup(conflict);
+ alpm_conflict_t *newconflict = _alpm_conflict_dup(conflict);
if(newconflict) {
*data = alpm_list_add(*data, newconflict);
}