summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/delta.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/delta.c')
-rw-r--r--lib/libalpm/delta.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c
index c5770bfc..d2c2fe80 100644
--- a/lib/libalpm/delta.c
+++ b/lib/libalpm/delta.c
@@ -40,7 +40,7 @@ static alpm_list_t *graph_init(alpm_list_t *deltas, int reverse)
alpm_list_t *vertices = NULL;
/* create the vertices */
for(i = deltas; i; i = i->next) {
- pmgraph_t *v = _alpm_graph_new();
+ alpm_graph_t *v = _alpm_graph_new();
if(!v) {
alpm_list_free(vertices);
return NULL;
@@ -54,11 +54,11 @@ static alpm_list_t *graph_init(alpm_list_t *deltas, int reverse)
/* compute the edges */
for(i = vertices; i; i = i->next) {
- pmgraph_t *v_i = i->data;
+ alpm_graph_t *v_i = i->data;
alpm_delta_t *d_i = v_i->data;
/* loop a second time so we make all possible comparisons */
for(j = vertices; j; j = j->next) {
- pmgraph_t *v_j = j->data;
+ alpm_graph_t *v_j = j->data;
alpm_delta_t *d_j = v_j->data;
/* We want to create a delta tree like the following:
* 1_to_2
@@ -84,7 +84,7 @@ static void graph_init_size(alpm_handle_t *handle, alpm_list_t *vertices)
for(i = vertices; i; i = i->next) {
char *fpath, *md5sum;
- pmgraph_t *v = i->data;
+ alpm_graph_t *v = i->data;
alpm_delta_t *vdelta = v->data;
/* determine whether the delta file already exists */
@@ -109,12 +109,12 @@ static void graph_init_size(alpm_handle_t *handle, alpm_list_t *vertices)
static void dijkstra(alpm_list_t *vertices)
{
alpm_list_t *i;
- pmgraph_t *v;
+ alpm_graph_t *v;
while(1) {
v = NULL;
/* find the smallest vertice not visited yet */
for(i = vertices; i; i = i->next) {
- pmgraph_t *v_i = i->data;
+ alpm_graph_t *v_i = i->data;
if(v_i->state == -1) {
continue;
@@ -132,7 +132,7 @@ static void dijkstra(alpm_list_t *vertices)
v->childptr = v->children;
while(v->childptr) {
- pmgraph_t *v_c = v->childptr->data;
+ alpm_graph_t *v_c = v->childptr->data;
alpm_delta_t *d_c = v_c->data;
if(v_c->weight > v->weight + d_c->download_size) {
v_c->weight = v->weight + d_c->download_size;
@@ -148,12 +148,12 @@ static void dijkstra(alpm_list_t *vertices)
static off_t shortest_path(alpm_list_t *vertices, const char *to, alpm_list_t **path)
{
alpm_list_t *i;
- pmgraph_t *v = NULL;
+ alpm_graph_t *v = NULL;
off_t bestsize = 0;
alpm_list_t *rpath = NULL;
for(i = vertices; i; i = i->next) {
- pmgraph_t *v_i = i->data;
+ alpm_graph_t *v_i = i->data;
alpm_delta_t *d_i = v_i->data;
if(strcmp(d_i->to, to) == 0) {
@@ -222,7 +222,7 @@ static alpm_list_t *find_unused(alpm_list_t *deltas, const char *to, off_t quota
vertices = graph_init(deltas, 1);
for(i = vertices; i; i = i->next) {
- pmgraph_t *v = i->data;
+ alpm_graph_t *v = i->data;
alpm_delta_t *vdelta = v->data;
if(strcmp(vdelta->to, to) == 0)
{
@@ -231,7 +231,7 @@ static alpm_list_t *find_unused(alpm_list_t *deltas, const char *to, off_t quota
}
dijkstra(vertices);
for(i = vertices; i; i = i->next) {
- pmgraph_t *v = i->data;
+ alpm_graph_t *v = i->data;
alpm_delta_t *vdelta = v->data;
if(v->weight > quota) {
unused = alpm_list_add(unused, vdelta->delta);