summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-06-28 14:37:16 +1000
committerAllan McRae <allan@archlinux.org>2011-06-28 23:28:23 +1000
commit1fdbe7902219c5ed3e56b921acae4f3a58b9e76e (patch)
treed239c30128748fbb228ce8992179a8b031be1c63
parent37b6cceed41bc22d0d9fb1fe2f274067ddd2b2cc (diff)
downloadpacman-1fdbe7902219c5ed3e56b921acae4f3a58b9e76e.tar.xz
Rename pmgrp_t to alpm_group_t
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/alpm.h6
-rw-r--r--lib/libalpm/db.c8
-rw-r--r--lib/libalpm/db.h2
-rw-r--r--lib/libalpm/group.c8
-rw-r--r--lib/libalpm/group.h4
-rw-r--r--lib/libalpm/sync.c2
-rw-r--r--src/pacman/query.c4
-rw-r--r--src/pacman/remove.c2
-rw-r--r--src/pacman/sync.c4
9 files changed, 20 insertions, 20 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 90bb5405..5af2efd7 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -137,12 +137,12 @@ typedef struct _alpm_fileconflict_t {
} alpm_fileconflict_t;
/** Package group */
-typedef struct _pmgrp_t {
+typedef struct _alpm_group_t {
/** group name */
char *name;
/** list of alpm_pkg_t packages */
alpm_list_t *packages;
-} pmgrp_t;
+} alpm_group_t;
/** Package upgrade delta */
typedef struct _pmdelta_t {
@@ -411,7 +411,7 @@ alpm_list_t *alpm_db_get_pkgcache(alpm_db_t *db);
* @param name of the group
* @return the groups entry on success, NULL on error
*/
-pmgrp_t *alpm_db_readgrp(alpm_db_t *db, const char *name);
+alpm_group_t *alpm_db_readgrp(alpm_db_t *db, const char *name);
/** Get the group cache of a package database.
* @param db pointer to the package database to get the group from
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 4c1922d9..248337a9 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -239,7 +239,7 @@ alpm_list_t SYMEXPORT *alpm_db_get_pkgcache(alpm_db_t *db)
}
/** Get a group entry from a package database. */
-pmgrp_t SYMEXPORT *alpm_db_readgrp(alpm_db_t *db, const char *name)
+alpm_group_t SYMEXPORT *alpm_db_readgrp(alpm_db_t *db, const char *name)
{
ASSERT(db != NULL, return NULL);
db->handle->pm_errno = 0;
@@ -595,7 +595,7 @@ static int load_grpcache(alpm_db_t *db)
for(i = alpm_pkg_get_groups(pkg); i; i = i->next) {
const char *grpname = i->data;
alpm_list_t *j;
- pmgrp_t *grp = NULL;
+ alpm_group_t *grp = NULL;
int found = 0;
/* first look through the group cache for a group with this name */
@@ -663,7 +663,7 @@ alpm_list_t *_alpm_db_get_grpcache(alpm_db_t *db)
return db->grpcache;
}
-pmgrp_t *_alpm_db_get_grpfromcache(alpm_db_t *db, const char *target)
+alpm_group_t *_alpm_db_get_grpfromcache(alpm_db_t *db, const char *target)
{
alpm_list_t *i;
@@ -672,7 +672,7 @@ pmgrp_t *_alpm_db_get_grpfromcache(alpm_db_t *db, const char *target)
}
for(i = _alpm_db_get_grpcache(db); i; i = i->next) {
- pmgrp_t *info = i->data;
+ alpm_group_t *info = i->data;
if(strcmp(info->name, target) == 0) {
return info;
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 9c6d6052..2f15c33c 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -104,7 +104,7 @@ alpm_pkg_t *_alpm_db_get_pkgfromcache(alpm_db_t *db, const char *target);
/* groups */
void _alpm_db_free_grpcache(alpm_db_t *db);
alpm_list_t *_alpm_db_get_grpcache(alpm_db_t *db);
-pmgrp_t *_alpm_db_get_grpfromcache(alpm_db_t *db, const char *target);
+alpm_group_t *_alpm_db_get_grpfromcache(alpm_db_t *db, const char *target);
#endif /* _ALPM_DB_H */
diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c
index 07acfa89..aefa7be8 100644
--- a/lib/libalpm/group.c
+++ b/lib/libalpm/group.c
@@ -30,17 +30,17 @@
#include "log.h"
#include "alpm.h"
-pmgrp_t *_alpm_grp_new(const char *name)
+alpm_group_t *_alpm_grp_new(const char *name)
{
- pmgrp_t* grp;
+ alpm_group_t* grp;
- CALLOC(grp, 1, sizeof(pmgrp_t), return NULL);
+ CALLOC(grp, 1, sizeof(alpm_group_t), return NULL);
STRDUP(grp->name, name, free(grp); return NULL);
return grp;
}
-void _alpm_grp_free(pmgrp_t *grp)
+void _alpm_grp_free(alpm_group_t *grp)
{
if(grp == NULL) {
return;
diff --git a/lib/libalpm/group.h b/lib/libalpm/group.h
index f2a67ca9..ad38c768 100644
--- a/lib/libalpm/group.h
+++ b/lib/libalpm/group.h
@@ -22,8 +22,8 @@
#include "alpm.h"
-pmgrp_t *_alpm_grp_new(const char *name);
-void _alpm_grp_free(pmgrp_t *grp);
+alpm_group_t *_alpm_grp_new(const char *name);
+void _alpm_grp_free(alpm_group_t *grp);
#endif /* _ALPM_GROUP_H */
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 954253d9..0c257684 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -220,7 +220,7 @@ alpm_list_t SYMEXPORT *alpm_find_grp_pkgs(alpm_list_t *dbs,
for(i = dbs; i; i = i->next) {
alpm_db_t *db = i->data;
- pmgrp_t *grp = alpm_db_readgrp(db, name);
+ alpm_group_t *grp = alpm_db_readgrp(db, name);
if(!grp)
continue;
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 2602c114..0a420c78 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -303,7 +303,7 @@ static int query_group(alpm_list_t *targets)
if(targets == NULL) {
for(j = alpm_db_get_grpcache(db_local); j; j = alpm_list_next(j)) {
- pmgrp_t *grp = alpm_list_getdata(j);
+ alpm_group_t *grp = alpm_list_getdata(j);
const alpm_list_t *p;
for(p = grp->packages; p; p = alpm_list_next(p)) {
@@ -313,7 +313,7 @@ static int query_group(alpm_list_t *targets)
}
} else {
for(i = targets; i; i = alpm_list_next(i)) {
- pmgrp_t *grp;
+ alpm_group_t *grp;
grpname = alpm_list_getdata(i);
grp = alpm_db_readgrp(db_local, grpname);
if(grp) {
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 75388f1a..eab8bdfc 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -47,7 +47,7 @@ static int remove_target(const char *target)
}
/* fallback to group */
- pmgrp_t *grp = alpm_db_readgrp(db_local, target);
+ alpm_group_t *grp = alpm_db_readgrp(db_local, target);
if(grp == NULL) {
pm_fprintf(stderr, PM_LOG_ERROR, "'%s': target not found\n", target);
return -1;
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 418cda1d..5b06a806 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -398,7 +398,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
const char *grpname = alpm_list_getdata(i);
for(j = syncs; j; j = alpm_list_next(j)) {
alpm_db_t *db = alpm_list_getdata(j);
- pmgrp_t *grp = alpm_db_readgrp(db, grpname);
+ alpm_group_t *grp = alpm_db_readgrp(db, grpname);
if(grp) {
/* get names of packages in group */
@@ -418,7 +418,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
alpm_db_t *db = alpm_list_getdata(i);
for(j = alpm_db_get_grpcache(db); j; j = alpm_list_next(j)) {
- pmgrp_t *grp = alpm_list_getdata(j);
+ alpm_group_t *grp = alpm_list_getdata(j);
if(level > 1) {
for(k = grp->packages; k; k = alpm_list_next(k)) {