From 53bf30cb4358c17b80f33b8003d8db8749c1276a Mon Sep 17 00:00:00 2001 From: "Jostein R. Natvig" Date: Mon, 30 Jan 2012 13:25:19 +0000 Subject: [PATCH] Parametrize macro, adjust braces. Remove commented-out warning message, that only confuse the reader. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bård Skaflestad --- facetopology.c | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/facetopology.c b/facetopology.c index b4fc8a75..a819fa3a 100644 --- a/facetopology.c +++ b/facetopology.c @@ -190,8 +190,10 @@ static int faceintersection(int *a1, int *a2, int *b1, int *b2) } -#define meaningful_face !((a1[i] ==INT_MIN) && (b1[j] ==INT_MIN)) && \ - !((a1[i+1]==INT_MAX) && (b1[j+1]==INT_MAX)) +#define meaningful_face(i,j) \ + !((a1[i] ==INT_MIN) && (b1[j] ==INT_MIN)) && \ + !((a1[i+1]==INT_MAX) && (b1[j+1]==INT_MAX)) + /* work should be pointer to 2n ints initialised to zero . */ void findconnections(int n, int *pts[4], @@ -220,13 +222,18 @@ void findconnections(int n, int *pts[4], /* for (i=0; i<2*n; work[i++]=-1); */ for (i = 0; i