diff --git a/bar.c b/bar.c index 837eee1..ff65673 100644 --- a/bar.c +++ b/bar.c @@ -1,4 +1,4 @@ -/* $Id: bar.c,v 1.3 2002/08/19 07:52:19 reinelt Exp $ +/* $Id: bar.c,v 1.4 2003/01/12 06:51:27 reinelt Exp $ * * generic bar handling * @@ -20,6 +20,9 @@ * * * $Log: bar.c,v $ + * Revision 1.4 2003/01/12 06:51:27 reinelt + * fixed bug in bar compaction + * * Revision 1.3 2002/08/19 07:52:19 reinelt * corrected type declaration of (*defchar)() * @@ -250,7 +253,7 @@ static int segment_deviation (int i, int j) j1=Segment[j].len1; if (j1>RES) i1=RES; j2=Segment[j].len2; if (j2>RES) i2=RES; - return (i1-i2)*(i1-i2)+(j1-j2)*(j1-j2); + return (i1-j1)*(i1-j1)+(i2-j2)*(i2-j2); } @@ -265,11 +268,9 @@ static void pack_segments (void) return; } - for (i=0; i