summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-01-19 10:28:44 +0100
committerAaron Griffin <aaron@archlinux.org>2007-01-19 10:28:44 +0100
commit616701726425417989ef1dca145b805deae6fe93 (patch)
tree2da68e080703c61a2c2116c0346b2dd58025015f /lib/libalpm/db.c
parent6d6ab5ed188d98fa057dbe2c83e8ce5126854426 (diff)
downloadpacman-616701726425417989ef1dca145b805deae6fe93.tar.gz
pacman-616701726425417989ef1dca145b805deae6fe93.tar.xz
Preliminary checkin for alpm_list conversion
* renamed pmlist_t -> alpm_list_t * made alpm_list_t a public type (alpm_list.h header) * removed additional storage for registered DBs in pacman source * some code cleanup * removed duplicate (pm)list_display functions from pacman source * misc code cleanup
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 1cc603be..84c05ccc 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -96,9 +96,9 @@ int _alpm_db_cmp(const void *db1, const void *db2)
return(strcmp(((pmdb_t *)db1)->treename, ((pmdb_t *)db2)->treename));
}
-pmlist_t *_alpm_db_search(pmdb_t *db, pmlist_t *needles)
+alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles)
{
- pmlist_t *i, *j, *k, *ret = NULL;
+ alpm_list_t *i, *j, *k, *ret = NULL;
for(i = needles; i; i = i->next) {
char *targ;
@@ -139,7 +139,7 @@ pmlist_t *_alpm_db_search(pmdb_t *db, pmlist_t *needles)
if(matched != NULL) {
_alpm_log(PM_LOG_DEBUG, " search target '%s' matched '%s'", targ, matched);
- ret = _alpm_list_add(ret, pkg);
+ ret = alpm_list_add(ret, pkg);
}
}
}
@@ -159,7 +159,7 @@ pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback)
RET_ERR(PM_ERR_DB_NOT_NULL, NULL);
}
} else {
- pmlist_t *i;
+ alpm_list_t *i;
for(i = handle->dbs_sync; i; i = i->next) {
pmdb_t *sdb = i->data;
if(strcmp(treename, sdb->treename) == 0) {
@@ -197,7 +197,7 @@ pmdb_t *_alpm_db_register(char *treename, alpm_cb_db_register callback)
if(strcmp(treename, "local") == 0) {
handle->db_local = db;
} else {
- handle->dbs_sync = _alpm_list_add(handle->dbs_sync, db);
+ handle->dbs_sync = alpm_list_add(handle->dbs_sync, db);
}
return(db);