From 0ffeaa22688bc608f26e7d7f8dff9c9264aa21e8 Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Fri, 25 May 2012 17:27:04 -0400 Subject: [PATCH] Fix how error messages are produced in the label lib. Following pathplan, we use fprintf (stderr... but someday we should factor this out to agerr(). --- lib/label/rectangle.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/label/rectangle.c b/lib/label/rectangle.c index 4364c99e6..305d7fe69 100644 --- a/lib/label/rectangle.c +++ b/lib/label/rectangle.c @@ -116,7 +116,6 @@ void PrintRect(Rect_t * r) /*----------------------------------------------------------------------------- | Calculate the n-dimensional area of a rectangle -----------------------------------------------------------------------------*/ -void agerror(char *); #if SIZEOF_LONG_LONG > SIZEOF_INT unsigned int RectArea(Rect_t * r) @@ -135,7 +134,7 @@ unsigned int RectArea(Rect_t * r) for (i = 0; i < NUMDIMS; i++) { long long a_test = area * r->boundary[i + NUMDIMS] - r->boundary[i]; if( a_test > UINT_MAX) { - agerror("label: area too large for rtree\n"); + fprintf(stderr, "label: area too large for rtree\n"); return UINT_MAX; } area = a_test; @@ -159,7 +158,7 @@ unsigned int RectArea(Rect_t * r) unsigned int b = r->boundary[i + NUMDIMS] - r->boundary[i]; a *= b; if( (a / b ) != area) { - agerror("label: area too large for rtree\n"); + fprintf(stderr, "label: area too large for rtree\n"); return UINT_MAX; } area = a; @@ -228,7 +227,7 @@ int Overlap(Rect_t * r, Rect_t * s) int Contained(Rect_t * r, Rect_t * s) { register int i, j, result; - assert((int) r && (int) s); + assert(r && s); /* undefined rect is contained in any other */ if (Undefined(r)) -- 2.50.1