X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fabt.c;h=ae746183021203605efa169e6989c7cc05844ec3;hb=refs%2Fheads%2Fpivot-table2;hp=b776612922f2579b290f3a3657f12adb8efee0fe;hpb=cb72db62c20ecab427229110820c5b053d0663c4;p=pspp diff --git a/src/libpspp/abt.c b/src/libpspp/abt.c index b776612922..ae74618302 100644 --- a/src/libpspp/abt.c +++ b/src/libpspp/abt.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,12 +28,12 @@ #include #endif -#include -#include +#include "libpspp/abt.h" #include -#include +#include "libpspp/cast.h" +#include "libpspp/assertion.h" static struct abt_node **down_link (struct abt *, struct abt_node *); static struct abt_node *skew (struct abt *, struct abt_node *); @@ -351,7 +351,7 @@ void abt_reaugmented (const struct abt *abt, struct abt_node *p) { for (; p != NULL; p = p->up) - abt->reaugment (p, p->down[0], p->down[1], abt->aux); + abt->reaugment (p, abt->aux); } /* Moves P around in ABT to compensate for its key having @@ -452,8 +452,8 @@ skew (struct abt *abt, struct abt_node *a) b->up = a->up; a->up = b; - abt->reaugment (a, a->down[0], a->down[1], abt->aux); - abt->reaugment (b, b->down[0], b->down[1], abt->aux); + abt->reaugment (a, abt->aux); + abt->reaugment (b, abt->aux); return b; } @@ -483,8 +483,8 @@ split (struct abt *abt, struct abt_node *a) b->level++; - abt->reaugment (a, a->down[0], a->down[1], abt->aux); - abt->reaugment (b, b->down[0], b->down[1], abt->aux); + abt->reaugment (a, abt->aux); + abt->reaugment (b, abt->aux); return b; }