]> granicus.if.org Git - graphviz/commitdiff
Backed out changeset 3ab8934555d7
authorEmden Gansner <erg@research.att.com>
Fri, 25 May 2012 21:56:23 +0000 (17:56 -0400)
committerEmden Gansner <erg@research.att.com>
Fri, 25 May 2012 21:56:23 +0000 (17:56 -0400)
lib/label/rectangle.c

index 305d7fe699517dd1710bccc5879ce9bb77e16dd1..4364c99e6af53f8dc1f270a56a67454d634f5e13 100644 (file)
@@ -116,6 +116,7 @@ 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)
@@ -134,7 +135,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) {
-       fprintf(stderr, "label: area too large for rtree\n");
+       agerror("label: area too large for rtree\n");
        return UINT_MAX;
       }
       area = a_test;
@@ -158,7 +159,7 @@ unsigned int RectArea(Rect_t * r)
       unsigned int b = r->boundary[i + NUMDIMS] - r->boundary[i];
       a *= b;
       if( (a / b ) != area) {
-       fprintf(stderr, "label: area too large for rtree\n");
+       agerror("label: area too large for rtree\n");
        return UINT_MAX;
       }
       area = a;
@@ -227,7 +228,7 @@ int Overlap(Rect_t * r, Rect_t * s)
 int Contained(Rect_t * r, Rect_t * s)
 {
     register int i, j, result;
-    assert(r && s);
+    assert((int) r && (int) s);
 
     /* undefined rect is contained in any other */
     if (Undefined(r))