From 939d5a9511b2dcbb07390ecfcd23528d8034709b Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:11:43 +1000 Subject: Rename pmdb_t to alpm_db_t Signed-off-by: Allan McRae --- src/pacman/query.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pacman/query.c') diff --git a/src/pacman/query.c b/src/pacman/query.c index 62472cb7..e0ec2c68 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -113,7 +113,7 @@ static int query_fileowner(alpm_list_t *targets) char *append; size_t max_length; alpm_list_t *t; - pmdb_t *db_local; + alpm_db_t *db_local; /* This code is here for safety only */ if(targets == NULL) { @@ -240,7 +240,7 @@ static int query_search(alpm_list_t *targets) { alpm_list_t *i, *searchlist; int freelist; - pmdb_t *db_local = alpm_option_get_localdb(config->handle); + alpm_db_t *db_local = alpm_option_get_localdb(config->handle); /* if we have a targets list, search for packages matching it */ if(targets) { @@ -299,7 +299,7 @@ static int query_group(alpm_list_t *targets) alpm_list_t *i, *j; char *grpname = NULL; int ret = 0; - pmdb_t *db_local = alpm_option_get_localdb(config->handle); + alpm_db_t *db_local = alpm_option_get_localdb(config->handle); if(targets == NULL) { for(j = alpm_db_get_grpcache(db_local); j; j = alpm_list_next(j)) { @@ -343,7 +343,7 @@ static int is_foreign(pmpkg_t *pkg) int match = 0; for(j = sync_dbs; j; j = alpm_list_next(j)) { - pmdb_t *db = alpm_list_getdata(j); + alpm_db_t *db = alpm_list_getdata(j); pmpkg_t *findpkg = alpm_db_get_pkg(db, pkgname); if(findpkg) { match = 1; @@ -483,7 +483,7 @@ int pacman_query(alpm_list_t *targets) int match = 0; alpm_list_t *i; pmpkg_t *pkg = NULL; - pmdb_t *db_local; + alpm_db_t *db_local; /* First: operations that do not require targets */ -- cgit v1.2.3 From 8a04bc25a14df93c0ca207ac83d43cdb867346a1 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 23:26:39 +1000 Subject: Rename pmpkg_t to alpm_pkg_t Signed-off-by: Allan McRae --- src/pacman/query.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/pacman/query.c') diff --git a/src/pacman/query.c b/src/pacman/query.c index e0ec2c68..2602c114 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -95,7 +95,7 @@ static int search_path(char **filename, struct stat *bufptr) return -1; } -static void print_query_fileowner(const char *filename, pmpkg_t *info) +static void print_query_fileowner(const char *filename, alpm_pkg_t *info) { if(!config->quiet) { printf(_("%s is owned by %s %s\n"), filename, @@ -189,7 +189,7 @@ static int query_fileowner(alpm_list_t *targets) for(i = alpm_db_get_pkgcache(db_local); i && !found; i = alpm_list_next(i)) { alpm_list_t *j; - pmpkg_t *info = alpm_list_getdata(i); + alpm_pkg_t *info = alpm_list_getdata(i); for(j = alpm_pkg_get_files(info); j && !found; j = alpm_list_next(j)) { char *ppath, *pdname; @@ -256,7 +256,7 @@ static int query_search(alpm_list_t *targets) for(i = searchlist; i; i = alpm_list_next(i)) { alpm_list_t *grp; - pmpkg_t *pkg = alpm_list_getdata(i); + alpm_pkg_t *pkg = alpm_list_getdata(i); if(!config->quiet) { printf("local/%s %s", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg)); @@ -307,7 +307,7 @@ static int query_group(alpm_list_t *targets) const alpm_list_t *p; for(p = grp->packages; p; p = alpm_list_next(p)) { - pmpkg_t *pkg = alpm_list_getdata(p); + alpm_pkg_t *pkg = alpm_list_getdata(p); printf("%s %s\n", grp->name, alpm_pkg_get_name(pkg)); } } @@ -335,7 +335,7 @@ static int query_group(alpm_list_t *targets) return ret; } -static int is_foreign(pmpkg_t *pkg) +static int is_foreign(alpm_pkg_t *pkg) { const char *pkgname = alpm_pkg_get_name(pkg); alpm_list_t *j; @@ -344,7 +344,7 @@ static int is_foreign(pmpkg_t *pkg) int match = 0; for(j = sync_dbs; j; j = alpm_list_next(j)) { alpm_db_t *db = alpm_list_getdata(j); - pmpkg_t *findpkg = alpm_db_get_pkg(db, pkgname); + alpm_pkg_t *findpkg = alpm_db_get_pkg(db, pkgname); if(findpkg) { match = 1; break; @@ -356,7 +356,7 @@ static int is_foreign(pmpkg_t *pkg) return 0; } -static int is_unrequired(pmpkg_t *pkg) +static int is_unrequired(alpm_pkg_t *pkg) { alpm_list_t *requiredby = alpm_pkg_compute_requiredby(pkg); if(requiredby == NULL) { @@ -366,7 +366,7 @@ static int is_unrequired(pmpkg_t *pkg) return 0; } -static int filter(pmpkg_t *pkg) +static int filter(alpm_pkg_t *pkg) { /* check if this package was explicitly installed */ if(config->op_q_explicit && @@ -396,7 +396,7 @@ static int filter(pmpkg_t *pkg) /* Loop through the packages. For each package, * loop through files to check if they exist. */ -static int check(pmpkg_t *pkg) +static int check(alpm_pkg_t *pkg) { alpm_list_t *i; const char *root; @@ -446,7 +446,7 @@ static int check(pmpkg_t *pkg) return (errors != 0 ? 1 : 0); } -static int display(pmpkg_t *pkg) +static int display(alpm_pkg_t *pkg) { int ret = 0; @@ -482,7 +482,7 @@ int pacman_query(alpm_list_t *targets) int ret = 0; int match = 0; alpm_list_t *i; - pmpkg_t *pkg = NULL; + alpm_pkg_t *pkg = NULL; alpm_db_t *db_local; /* First: operations that do not require targets */ -- cgit v1.2.3 From 1fdbe7902219c5ed3e56b921acae4f3a58b9e76e Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 28 Jun 2011 14:37:16 +1000 Subject: Rename pmgrp_t to alpm_group_t Signed-off-by: Allan McRae --- src/pacman/query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/query.c') 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) { -- cgit v1.2.3 From f1bb56cebfda9b11ea02754d325ff659014e2caa Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 29 Jun 2011 15:46:49 +1000 Subject: Rename public functions with grp in their name Using grp instead of group is a small saving at the cost of clarity. Rename the following functions: alpm_option_get_ignoregrps -> alpm_option_get_ignoregroups alpm_option_add_ignoregrp -> alpm_option_add_ignoregroup alpm_option_set_ignoregrps -> alpm_option_set_ignoregroups alpm_option_remove_ignoregrp -> alpm_option_remove_ignoregroup alpm_db_readgrp -> alpm_db_readgroup alpm_db_get_grpcache -> alpm_db_get_groupcache alpm_find_grp_pkgs -> alpm_find_group_pkgs Signed-off-by: Allan McRae --- src/pacman/query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/query.c') diff --git a/src/pacman/query.c b/src/pacman/query.c index 0a420c78..826c2262 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -302,7 +302,7 @@ static int query_group(alpm_list_t *targets) alpm_db_t *db_local = alpm_option_get_localdb(config->handle); if(targets == NULL) { - for(j = alpm_db_get_grpcache(db_local); j; j = alpm_list_next(j)) { + for(j = alpm_db_get_groupcache(db_local); j; j = alpm_list_next(j)) { alpm_group_t *grp = alpm_list_getdata(j); const alpm_list_t *p; @@ -315,7 +315,7 @@ static int query_group(alpm_list_t *targets) for(i = targets; i; i = alpm_list_next(i)) { alpm_group_t *grp; grpname = alpm_list_getdata(i); - grp = alpm_db_readgrp(db_local, grpname); + grp = alpm_db_readgroup(db_local, grpname); if(grp) { const alpm_list_t *p; for(p = grp->packages; p; p = alpm_list_next(p)) { -- cgit v1.2.3